Help

Re: Multiple IF Statements with Multiple Columns

358 2
cancel
Showing results for 
Search instead for 
Did you mean: 
mraspie
4 - Data Explorer
4 - Data Explorer
I am trying to group line items based on the below conditions, but for some reason it's not working for all the "Done" ones. It does work for the 2023 items that are marked Done in the status column, but the one 2024 item that is marked Done in the status column still returns the 2024Q3. I really hope this makes sense.
 
IF(REGEX_MATCH({Labels},"(2024Q4_\\w)"),"Unscheduled",
IF(REGEX_MATCH({Labels},"(2024Q4)"),"2024Q4",
IF(REGEX_MATCH({Labels},"(2024Q3)"),"2024Q3",
IF(REGEX_MATCH({Labels},"(2024Q2)"),"2024Q2",
IF(REGEX_MATCH({Labels},"(2024Q1)"),"2024Q1",
IF(AND({Labels},"(2023)",{Status} = "Done"),"2023 Complete",
IF(AND({Labels},"(2024)",{Status} = "Done"),"2024 Complete",
"Unscheduled")))))))
12 Replies 12

Weird. When I paste that complete formula in, save it and confirm the change, ends up removing all except the Done formula. Maybe that's a glitch?

mraspie_0-1722522453853.png

 

Nope, just a bracket missed. Or, more accurately, misplaced.
I tried with the same result. Quite a rare behavior, I saw it 2 times 2-3 years ago, when I learned to write formulas in Airtable. 

That's a correct working version:

 

 

IF({Status} = "Done",  
IF( FIND("2024", Labels),"2024 Complete",
IF( FIND("2023", Labels),"2023 Complete")),
IF(REGEX_MATCH({Labels},"(2024Q4_\\w)"),"Unscheduled",
IF(REGEX_MATCH({Labels},"(2024Q4)"),"2024Q4",
IF(REGEX_MATCH({Labels},"(2024Q3)"),"2024Q3",
IF(REGEX_MATCH({Labels},"(2024Q2)"),"2024Q2",
IF(REGEX_MATCH({Labels},"(2024Q1)"),"2024Q1",
"Unscheduled"))))))

 

That worked! Thank you sooooooo much!