If/Or

Options

Hello,

I am trying to create a flag function based on two Date columns. I want the Flag to go up if either the Date 1 or Date 2 column.

I have unsuccessfully tried: IF(OR([Date 1]@row), "Blank", ([Date 2]@row), "Blank", "Flag", "Unflag")

should I be using numbers instead of "Blank"?

Thank you

Best Answer

  • Kelly Moore
    Kelly Moore ✭✭✭✭✭✭
    Answer ✓
    Options

    Hey @Sarah Salazar

    My personal preference is to designate a blank cell using the double double-quote characters because it’s less typing and I don’t have to keep up with parentheses. Otherwise, you must use the ISBLANK() function. I’ll write your formula both ways.

    Flags are turned ON and OFF like checkboxes using zereos and ones. Numbers are not enclosed with quotes.

    =IF(OR([Date 1]@row=“”, [Date 2]@row=“”, 1)

    Or

    =IF(OR(ISBLANK([Date 1]@row), ISBLANK([Date 2]@row)), 1)

    Does that work for you?

    Kelly

Answers

  • Kelly Moore
    Kelly Moore ✭✭✭✭✭✭
    Answer ✓
    Options

    Hey @Sarah Salazar

    My personal preference is to designate a blank cell using the double double-quote characters because it’s less typing and I don’t have to keep up with parentheses. Otherwise, you must use the ISBLANK() function. I’ll write your formula both ways.

    Flags are turned ON and OFF like checkboxes using zereos and ones. Numbers are not enclosed with quotes.

    =IF(OR([Date 1]@row=“”, [Date 2]@row=“”, 1)

    Or

    =IF(OR(ISBLANK([Date 1]@row), ISBLANK([Date 2]@row)), 1)

    Does that work for you?

    Kelly

  • Sarah Salazar
    Options

    Thank you @Kelly Moore the second one worked perfectly. I appreciate your explanation. Thank you so much!

  • Kelly Moore
    Kelly Moore ✭✭✭✭✭✭
    Options

    Oops, I forgot the closing OR parenthesis in my first one- that's the challenge of typing on the cellphone.

    =IF(OR([Date 1]@row=“”, [Date 2]@row=“”), 1)

    Glad one of them worked first try

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!