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
-
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! 😊
-
Hey @Draykov. Looks like it's 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
-
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! 😊
-
Hey @Draykov. Looks like it's 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")))
-
Thank you @Nick Korna and @Samuel Mueller! I was going bracket blind. :) Thanks for the assistance!
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 65K Get Help
- 441 Global Discussions
- 140 Industry Talk
- 472 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 69 Community Job Board
- 497 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives