Using IF and isblank function to print column value

Hello, I am new to smartsheets and am having a little difficulty getting my spreadsheet to print the actual column value when using if and is blank.

I have two columns: a request by date (manual) and due date (automatic).

The formula should first read the request by date column and print that date if there is a value however if the column is blank, then it should print the usual due date.

=IF(ISBLANK([Request Date]@row), ([Due Date]@row,) ([Request Date]@row))

This only gives me an #UNPARSEABLE response.

I was planning to combine this with a simple formula to track days until due via =(above string) - today().


Let me know if I am missing something, thank you!

Best Answer

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

    oh. I didn't realize you had a 3rd date. By the way, this is in a 4th date column, correct?

    We received an invalid data error from [Request Date]=0. A date column wouldn't have a zero. I misunderstood you when you mentioned a third column needs to be checked-I thought you meant a checkbox column. My bad.

    =IF([Column1]@row<>"", [Date1]@row, IF([Column1]@row="", [Date2]@row, IF(AND([Column1]@row="", [Column2]@row=""), [Date3]@row)))

    plug your columns into the above.

Answers

  • John Fasano
    John Fasano ✭✭✭

    I forgot to include a 3rd column that needs to be checked, so two columns would need to be blank for the date to revert to the original due date, thank you!

  • Kelly Moore
    Kelly Moore ✭✭✭✭✭✭

    Hey @John Fasano

    Try this

    =IF(AND(ISBLANK([Request Date]@row), [your checkbox column]@row=0), [Due Date]@row, [Request Date]@row)

    be sure to replace insert your real checkbox column name into the formula.

    In your original formula the terms were enclosed in parentheses - this prevented the formula from executing.

    Let me know if I need to tweak this further

    cheers

  • John Fasano
    John Fasano ✭✭✭

    Hi KDM, thanks for responding.

    I tried that and am getting an #INVALID error. Here is what I put in.

    =IF(AND(ISBLANK([Request Date]@row), [Request Date]@row = 0), [Rev Date]@row, [Due Date]@row)

    Recap of flow: If Column 1 is not blank, then show Column 1 Date. If Column 1 is blank, then show Column 2 Date. If Columns 1 and 2 are blank, then show Column 3 date.

    Let me know what you think I might've messed up, thanks!

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

    oh. I didn't realize you had a 3rd date. By the way, this is in a 4th date column, correct?

    We received an invalid data error from [Request Date]=0. A date column wouldn't have a zero. I misunderstood you when you mentioned a third column needs to be checked-I thought you meant a checkbox column. My bad.

    =IF([Column1]@row<>"", [Date1]@row, IF([Column1]@row="", [Date2]@row, IF(AND([Column1]@row="", [Column2]@row=""), [Date3]@row)))

    plug your columns into the above.

  • John Fasano
    John Fasano ✭✭✭
    edited 02/02/21

    Would this be a correct interpretation? All of the cells lead to the correct columns however for some reason it is giving me a #INVALID COLUMN VALUE.

    All of the columns are formatted as dates.

    =IF([Request Date]@row <> "", [Request Date]@row, IF([Request Date]@row = "", [Rev Date]@row, IF(AND([Request Date]@row = "", [Rev Date]@row = ""), [Due Date]@row)))

    Thanks for working with me.

  • Kelly Moore
    Kelly Moore ✭✭✭✭✭✭

    Ok, I cleaned it and tested it on my sheet. It works. Hopefully I kept your conditions straight. Let's see what you get.

    Kelly

  • John Fasano
    John Fasano ✭✭✭

    Ok that worked, I wasnt testing it with the full formula since I was pulling from Date formatted columns and ending in a text/number column where the date would only be converted when I added in the rest of the formula.

    Thank you very much!

  • Kelly Moore
    Kelly Moore ✭✭✭✭✭✭

    Hey

    Glad you got it working. I just saw the last 'cleaned up' formula didn't post. oh well.

    Glad you are part of the community,

    cheers

    Kelly

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!