Formulas and Functions

Formulas and Functions

Ask for help with your formula and find examples of how others use formulas and functions to solve a similar problem.

IF/AND Formula

Formulas are the bane of my existence and I really need to take a class! Today I'm trying to set up a formula to throw a flag when 2 conditions are met. I want a red ball when I have not received an invoice and the invoice due date is within 30 days. I know I'm close since I've gone from "unparsable" to "incorrect argument"! Here is what I have:

=IF([Invoice Received?]@row = 0, IF(AND([Renewal Date]@row >= TODAY(), [Renewal Date]@row <= TODAY(+30), "Red")))

How do I fix??

Best Answers

  • Community Champion
    Answer ✓

    You were, indeed, very close.

    =IF([Invoice Received?]@row = 0, IF(AND([Renewal Date]@row >= TODAY(), [Renewal Date]@row <= TODAY(+30)), "Red"))

  • Community Champion
    Answer ✓

    IF/AND Formula

    It looks like you forgot to close out the AND funtion. Try this

    =IF([Invoice Received?]@row = 0, "Green", IF(AND([Renewal Date]@row >= TODAY(0), [Renewal Date]@row <= TODAY(+30)), "Red", "Yellow"))

    Hope this helps!

    Sincerely,

    Jacob Stey

Answers

  • Community Champion
    Answer ✓

    You were, indeed, very close.

    =IF([Invoice Received?]@row = 0, IF(AND([Renewal Date]@row >= TODAY(), [Renewal Date]@row <= TODAY(+30)), "Red"))

  • Community Champion
    Answer ✓

    IF/AND Formula

    It looks like you forgot to close out the AND funtion. Try this

    =IF([Invoice Received?]@row = 0, "Green", IF(AND([Renewal Date]@row >= TODAY(0), [Renewal Date]@row <= TODAY(+30)), "Red", "Yellow"))

    Hope this helps!

    Sincerely,

    Jacob Stey

  • ✭✭✭✭✭✭

    Thanks @SteyJ ! I made one tweak:

    =IF([Invoice Received?]@row = 0, IF(AND([Renewal Date]@row >= TODAY(0), [Renewal Date]@row <= TODAY(+30)), "Red", "Yellow"))

    I don't need the Green dot that you put at the beginning but I do see what you did. I didn't put in the alternate, if this meets the condition do X/if it doesn't meet the condition do Y. I missed the 'doesn't meet condition' part.

  • ✭✭✭✭✭✭

    Thanks also @Carson Penticuff ! Your formula works as well and now I need to determine the difference! Always good to have options!

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!

Trending in Formulas and Functions