Help with IF formula - 3 options to return

OlgaO
OlgaO ✭✭
edited 11/11/24 in Formulas and Functions

Hello Smartsheet Community,

I'm struggling with something that I guess should be a very simple formula. I need to assign one of 3 values to the row based on the following rules:

  1. If Cutoff Date > Event Date, return "Pre-"
  2. If Cutoff Date < Event Date AND Weeks Post Cutoff Date </=8, return "Post1"
  3. If Cutoff Date < Event Date AND Weeks Post Cutoff Date >8, return "Post

Weeks post Cutoff Date is calculated using a formula (difference between two dates).

The formula I wrote is as follows but it returns as #UNPARSEABLE.

=IF([Event Date]@row <Cutoff Date]@row, "Pre-"), IF(AND([Event Date]@row >[Cutoff Date]@row, [Weeks Post Cutoff Date]@row <=8), "Post1"), IF(AND([Event Date]@row > [Cutoff Date]@row, [Weeks Post Cutoff Date]@row >8), "Post2")

I feel like I'm missing something obvious.

Thank you!

Tags:

Best Answer

  • OlgaO
    OlgaO ✭✭
    edited 11/11/24 Answer ✓

    OK, problem solved now. It looks like I had extra closing parenthesis. Also simplified the formula a bit:

    =IF([Weeks post Cutoff Date]@row <0, "Pre-", IF([Weeks post Cutoff Date]@row >8), "Post2", "Post1"))

    Now it works fine.

Answers

  • OlgaO
    OlgaO ✭✭
    edited 11/11/24 Answer ✓

    OK, problem solved now. It looks like I had extra closing parenthesis. Also simplified the formula a bit:

    =IF([Weeks post Cutoff Date]@row <0, "Pre-", IF([Weeks post Cutoff Date]@row >8), "Post2", "Post1"))

    Now it works fine.

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!