Combining multiple IF(OR statements

I'm trying to combine these three functional IF(OR statements into a single working formula:
=IF(OR(Webinar@row = "Session 1|Afternoon", Webinar@row = "Session 1|Evening"), "08/24/2023")
=IF(OR(Webinar@row = "Session 2|Afternoon", Webinar@row = "Session 2|Evening"), "08/29/2023")
=IF(OR(Webinar@row = "Session 3|Afternoon", Webinar@row = "Session 3|Evening"), "08/31/2023")
I tried the following:
=IF(OR(Webinar@row = "Session 1|Afternoon", Webinar@row = "Session 1|Evening"), "08/24/2023"), IF(OR(Webinar@row = "Session 2|Afternoon", Webinar@row = "Session 2|Evening"), "08/29/2023"), IF(OR(Webinar@row = "Session 3|Afternoon", Webinar@row = "Session 3|Evening"), "08/31/2023")
...but that is UNPARSEABLE.
I expect there is a way to do it that I'm just missing...possibly by throwing an (AND in there somewhere.
Thanks!
Best Answers
-
Nick Korna ✭✭✭✭✭✭
Hi@Draykov,
This is an easy fix - you have some brackets in the wrong place which is causing the IF statements to not be nested properly. When combining the individual IFs, the closing brackets should end up at the end of the combined statement, with a comma separating to make the false part of the IF statement, like so:
=IF(OR(Webinar@row = "Session 1|Afternoon", Webinar@row = "Session 1|Evening"), "08/24/2023", IF(OR(Webinar@row = "Session 2|Afternoon", Webinar@row = "Session 2|Evening"), "08/29/2023", IF(OR(Webinar@row = "Session 3|Afternoon", Webinar@row = "Session 3|Evening"), "08/31/2023")))
Give this a whirl and it should work for you - if there are still issues then post what error you're getting!
-
Samuel Mueller ✭✭✭✭✭✭
Hey@Draykov.看起来是just placement of parentheses! Try the below
=IF(OR(Webinar@row = "Session 1|Afternoon", Webinar@row = "Session 1|Evening"), "08/24/2023", IF(OR(Webinar@row = "Session 2|Afternoon", Webinar@row = "Session 2|Evening"), "08/29/2023", IF(OR(Webinar@row = "Session 3|Afternoon", Webinar@row = "Session 3|Evening"), "08/31/2023")))
Answers
-
Nick Korna ✭✭✭✭✭✭
Hi@Draykov,
This is an easy fix - you have some brackets in the wrong place which is causing the IF statements to not be nested properly. When combining the individual IFs, the closing brackets should end up at the end of the combined statement, with a comma separating to make the false part of the IF statement, like so:
=IF(OR(Webinar@row = "Session 1|Afternoon", Webinar@row = "Session 1|Evening"), "08/24/2023", IF(OR(Webinar@row = "Session 2|Afternoon", Webinar@row = "Session 2|Evening"), "08/29/2023", IF(OR(Webinar@row = "Session 3|Afternoon", Webinar@row = "Session 3|Evening"), "08/31/2023")))
Give this a whirl and it should work for you - if there are still issues then post what error you're getting!
-
Samuel Mueller ✭✭✭✭✭✭
Hey@Draykov.看起来是just placement of parentheses! Try the below
=IF(OR(Webinar@row = "Session 1|Afternoon", Webinar@row = "Session 1|Evening"), "08/24/2023", IF(OR(Webinar@row = "Session 2|Afternoon", Webinar@row = "Session 2|Evening"), "08/29/2023", IF(OR(Webinar@row = "Session 3|Afternoon", Webinar@row = "Session 3|Evening"), "08/31/2023")))
-
Draykov ✭✭
Thank you@Nick Kornaand@Samuel Mueller! I was going bracket blind. :) Thanks for the assistance!
Categories