IF with multiple conditions

I feel like I’m close with this one, but it’s not quite working.

I want to show quarters of the year, so if a column equals “January 2021”,“February 2021”, “March 2021”, I want it to show “January - April 2021”, and so on for each quarter. I’ve attempted it with IF(OR), but it’s not working. Appreciate any tips here.

IF(OR({Result Month/Year}="January 2021","February 2021", "March 2021"),"January-April 2021",IF(OR({Result Month/Year}="April 2021","May 2021", "June 2021"),"April-June 2021"))

The problem with your formula is with your OR condition. Each entry in the OR should be a complete comparison.

Instead of …

OR({Result Month/Year}="January 2021","February 2021", "March 2021")

you need …

  {Result Month/Year}="January 2021",
  {Result Month/Year}="February 2021",
  {Result Month/Year}="March 2021"

However, if you have access to an original date field, try this formula. It will work with any year

SWITCH( DATETIME_FORMAT({date field}, 'Q'),
    "1", "January - March " & YEAR({date field}),
    "2", "April - June " & YEAR({date field}),
    "3", "July - September " & YEAR({date field}),
    "4", "October - December " & YEAR({date field})

That’s awesome thanks :grinning:

This topic was solved and automatically closed 3 days after the last reply. New replies are no longer allowed.