IF statement with two possible outputs

Hi there,

I'm trying to populate a cell/column with a couple scenarios:

Column names: "Region/Country", "Wine", "Vintage", and "For copy-paste"

If the Region/Country = "Champagne", then the "For copy-paste" cell should populate with Region/Country + Wine + Vintage.

If the Region/Country is anything but Champagne, then the "For copy-paste" cell should be simply Wine + Vintage.

Please help! Thanks so much.

Answers

  • Dan W
    Dan W ✭✭✭✭✭
    edited 07/14/22

    If the Region/Country is Champagne, and lets say the wine and Vintage are "1"

    this formula will display: Champagne-1-1

    =IF(HAS([Region/Country]@row, "Champagne"), [Region/Country]@row + "-" + Wine@row + "-" + Vintage@row, Wine@row + "-" + Vintage@row)

    You can edit the "-" to whatever you like to fit how you want it to read. Such as changing them to "/" to read: Champagne/1/1. Removing the - but leaving a space " " will display: Champagne 1 1

  • That worked like a charm! Thank you so much!

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!