Help on how to insert a formula based on another cell criteria

Lorri Rose
edited 10:25AM in Formulas and Functions

I want to create a simple subtraction formula that will only be added to the cell if another cell is one of two text responses. I know I could do the subtraction as a column formula very easily but most cells in the column don't meet the need for this formula so come back as Unparseable which just looks awful.

This is what I have tried

=IF(OR([Refund or New Date]@row=”Refund”, ”New Course”),THEN([Created]@row-[Date of Course]@row)

=IF([Refund or New Date]@row, ISTEXT, value_if_true, [Created]@row-[Date of Course]@row)

We have a refund and rebooking policy and to make it easier for the admin staff to know if the request meets the criteria (i.e has been requested in time) I want to subtract the dates automatically.

Help please?

Tags:

Answers

  • Protonsponge
    Protonsponge ✭✭✭✭✭✭
    edited 10:46AM

    Hello @Lorri Rose

    If I read correctly, are you looking to subtract [Created] minus [Date of Course] if [Refund or New Date] equals either " Refund" or "New Course"? If so the following may be helpful to you:-

    =IF(OR([Refund or New Date]@row = "Refund", [Refund or New Date]@row = "New Course"), Created@row - [Date of Course]@row, "")

    I hope that is helpful to you in someway,

    Protonsponge

  • Oh that seems to work perfectly - thank you so much!

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!