Why is my formula #UNPARSEABLE?

=IF(Created@cell < DATE(2021,6,30),"Gray",IF(OR(AND([Priority]@cell = "P1",[Days Since Creation]@cell <= 30),AND([Priority]@cell = "P2",[Days Since Creation]@cell <=45), AND([Priority]@cell="P3",[Days Since Creation]@cell<=60), AND([Priority]@cell="P4",[Days Since Creation]@cell<=120),AND([Priority]@cell="P5",[Days Since Creation]@cell<=180)),"Green",IF(OR(AND([Priority]@cell="P1",[Days Since Creation]@cell>30,[Days Since Creation]@cell<=45),AND([Priority]@cell="P2",[Days Since Creation]@cell>45, [Days Since Creation]@cell<=60), AND([Priority]@cell="P3",[Days Since Creation]@cell>60, [Days Since Creation]@cell<=90), AND([Priority]@cell="P4",[Days Since Creation]@cell>120, [Days Since Creation]@cell<=150), AND([Priority]@cell="P5",[Days Since Creation]@cell>180, [Days Since Creation]@cell<210)), "Yellow","Red")))

Best Answer

  • Sameer Karkhanis
    Sameer Karkhanis ✭✭✭✭✭✭
    edited 02/09/22 Answer ✓

    See if below helps (Column names should still be cross checked as mentioned before)

    =IF(Created@cell < DATE(2020,6,30), "Gray",
    	IF(OR(AND([Priority]@cell = "P1", [Days Since Creation]@cell <= 30),
    				AND([Priority]@cell = "P2", [Days Since Creation]@cell <= 45),
    				AND([Priority]@cell = "P3", [Days Since Creation]@cell <= 60),
    				AND([Priority]@cell = "P4", [Days Since Creation]@cell <= 120),
    				AND([Priority]@cell = "P5", [Days Since Creation]@cell <= 180)
    			),"Green",
    		IF(OR(AND([Priority]@cell ="P1", [Days Since Creation]@cell > 30, [Days Since Creation]@cell <= 45),
    				AND([Priority]@cell = "P2", [Days Since Creation]@cell > 45, [Days Since Creation]@cell <= 60),
    				AND([Priority]@cell = "P3", [Days Since Creation]@cell > 60, [Days Since Creation]@cell <= 90),
    				AND([Priority]@cell = "P4", [Days Since Creation]@cell > 120, [Days Since Creation]@cell <= 150),
    				AND([Priority]@cell = "P5", [Days Since Creation]@cell > 180, [Days Since Creation]@cell < 210)
    				), "Yellow","Red"
    			)
    		)
    	)
    
    

Answers

  • Sameer Karkhanis
    Sameer Karkhanis ✭✭✭✭✭✭

    I don't think you can compare the date directly as 06/30/20. Please replace that with DATE(2020,6,30) instead. (Also month of June has 30 days only :-) ) [Also assuming all the rest of the syntax with brackets and commas is good]

  • MistyDingus
    edited 02/09/22

    Thanks Sameer. It looks like I might have some other issues with syntax. I made some adjustments based on your comment and have edited my original post to reflect, but ultimately it's still unparseable.

  • Sameer Karkhanis
    Sameer Karkhanis ✭✭✭✭✭✭

    Check if the columns names used in the formula match with those in the Sheet (case matters so look for that too)

  • Sameer Karkhanis
    Sameer Karkhanis ✭✭✭✭✭✭
    edited 02/09/22 Answer ✓

    See if below helps (Column names should still be cross checked as mentioned before)

    =IF(Created@cell < DATE(2020,6,30), "Gray",
    	IF(OR(AND([Priority]@cell = "P1", [Days Since Creation]@cell <= 30),
    				AND([Priority]@cell = "P2", [Days Since Creation]@cell <= 45),
    				AND([Priority]@cell = "P3", [Days Since Creation]@cell <= 60),
    				AND([Priority]@cell = "P4", [Days Since Creation]@cell <= 120),
    				AND([Priority]@cell = "P5", [Days Since Creation]@cell <= 180)
    			),"Green",
    		IF(OR(AND([Priority]@cell ="P1", [Days Since Creation]@cell > 30, [Days Since Creation]@cell <= 45),
    				AND([Priority]@cell = "P2", [Days Since Creation]@cell > 45, [Days Since Creation]@cell <= 60),
    				AND([Priority]@cell = "P3", [Days Since Creation]@cell > 60, [Days Since Creation]@cell <= 90),
    				AND([Priority]@cell = "P4", [Days Since Creation]@cell > 120, [Days Since Creation]@cell <= 150),
    				AND([Priority]@cell = "P5", [Days Since Creation]@cell > 180, [Days Since Creation]@cell < 210)
    				), "Yellow","Red"
    			)
    		)
    	)
    
    
  • Thanks for your help on this Sameer.

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!