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
- Smartsheet Customer Resources
- 62.9K Get Help
- 378 Global Discussions
- 208 Industry Talk
- 441 Announcements
- 4.5K Ideas & Feature Requests
- 139 Brandfolder
- 129 Just for fun
- 130 Community Job Board
- 449 Show & Tell
- 30 Member Spotlight
- 1 SmartStories
- 290 Events
- 33 Webinars
- 7.3K Forum Archives