IF/OR Quarters Formula

SofiRuiz
SofiRuiz Overachievers Alumni

Hello! I am trying to come up with a formula to assign Quarters to a sheet, based on if the month is 1, 2, 3, etc. (Jan, Feb, Mar, etc.)


I am trying to use IF(OR and I get it to work until Q2, but for some reason when I add Q3 section (highlighted) it is saying syntax is wrong. It is probably something obvious that I am not getting, but I appreciate your help!


Thank you!!


It works until this point:

=IF(OR([Month Formula]@row = "1", [Month Formula]@row = "2", [Month Formula]@row = "3"), "Q1", IF(OR([Month Formula]@row = "4", [Month Formula]@row = "5", [Month Formula]@row = "6"), "Q2", "Q4"))


This does not work:

=IF(OR([Month Formula]@row = "1", [Month Formula]@row = "2", [Month Formula]@row = "3"), "Q1", IF(OR([Month Formula]@row = "4", [Month Formula]@row = "5", [Month Formula]@row = "6"), "Q2", IF(OR([Month Formula]@row="7",[Month Formula]@row="8",[Month Formula]@row="9"[Month Formula]@row="10"),"Q3","Q4"))))

Tags:

Best Answers

  • Jeff Reisman
    Jeff Reisman ✭✭✭✭✭✭
    Answer ✓

    @SofiRuiz

    Looks like you're missing a comma right here, between "9" and [Month Formula]

    Also, FYI - October should go in Q4 😉

    Regards,

    Jeff Reisman

    Link: Smartsheet Functions Help Pages Link: Smartsheet Formula Error Messages

    If my answer helped solve your issue, please mark it as accepted so that other users can find it later. Thanks!

  • Toufong Vang
    Toufong Vang ✭✭✭✭✭
    Answer ✓

    Try...

    =IF(OR([Month Formula]@row = "1", [Month Formula]@row = "2", [Month Formula]@row = "3"), "Q1", IF(OR([Month Formula]@row = "4", [Month Formula]@row = "5", [Month Formula]@row = "6"), "Q2" , IF(OR([Month Formula]@row="7",[Month Formula]@row="8",[Month Formula]@row="9",[Month Formula]@row="10"),"Q3","Q4")))

    Your formula:

    • Had an extra closing parenthesis.
    • Had a missing comma between [Month Formula]@row="9" and [Month Formula]@row="10".


Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!