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!

Tags:

Best Answers

  • Nick Korna
    Nick Korna ✭✭✭✭✭✭
    Answer ✓

    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
    Samuel Mueller ✭✭✭✭✭✭
    Answer ✓

    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
    Nick Korna ✭✭✭✭✭✭
    Answer ✓

    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
    Samuel Mueller ✭✭✭✭✭✭
    Answer ✓

    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
    Draykov ✭✭

    Thank you@Nick Kornaand@Samuel Mueller! I was going bracket blind. :) Thanks for the assistance!

@ocanel<\/a> <\/p>

Excellent, and yes, I am too! Thanks!<\/p>

I'd recommend using Dynamic View.<\/p>

Share it with your company domain.<\/p>

When the user accesses it, they would only see their own submissions.<\/p>

More info.<\/p>

\n \n https:\/\/help.smartsheet.com\/learning-track\/integrations-and-add-ons\/dynamic-view\n <\/a>\n<\/div>

Would that work\/help?<\/p>

Remember! <\/strong>Did my post(s) help or answer your question or solve your problem? Please support the Community by <\/em>marking it Insightful\/Vote Up\/Awesome or\/and as the accepted answer<\/em><\/strong>. It will make it easier for others to find a solution or help to answer!<\/em><\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question"},"bookmarked":false,"unread":false,"category":{"categoryID":321,"name":"Smartsheet Basics","url":"https:\/\/community.smartsheet.com\/categories\/smartsheet-basics%2B","allowedDiscussionTypes":[]},"reactions":[{"tagID":3,"urlcode":"Promote","name":"Promote","class":"Positive","hasReacted":false,"reactionValue":5,"count":0},{"tagID":5,"urlcode":"Insightful","name":"Insightful","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":11,"urlcode":"Up","name":"Vote Up","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":13,"urlcode":"Awesome","name":"Awesome","class":"Positive","hasReacted":false,"reactionValue":1,"count":0}],"tags":[{"tagID":204,"urlcode":"Forms","name":"Forms"},{"tagID":324,"urlcode":"community-platform","name":"Community Platform"},{"tagID":334,"urlcode":"automations","name":"Automations"},{"tagID":440,"urlcode":"project-management","name":"Project Management"},{"tagID":448,"urlcode":"workflows-in-smartsheet","name":"Workflows in Smartsheet"}]},{"discussionID":108733,"type":"question","name":"Combining multiple IF(OR statements","excerpt":"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\",…","snippet":"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\"),…","categoryID":321,"dateInserted":"2023-08-09T15:03:32+00:00","dateUpdated":null,"dateLastComment":"2023-08-09T15:39:06+00:00","insertUserID":154566,"insertUser":{"userID":154566,"name":"Draykov","url":"https:\/\/community.smartsheet.com\/profile\/Draykov","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/YUD6MF5OSNWQ\/nCTGFDW964F4K.png","dateLastActive":"2023-08-09T16:06:28+00:00","banned":0,"punished":0,"private":false,"label":"✭✭"},"updateUserID":null,"lastUserID":154566,"lastUser":{"userID":154566,"name":"Draykov","url":"https:\/\/community.smartsheet.com\/profile\/Draykov","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/YUD6MF5OSNWQ\/nCTGFDW964F4K.png","dateLastActive":"2023-08-09T16:06:28+00:00","banned":0,"punished":0,"private":false,"label":"✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":3,"countViews":40,"score":null,"hot":3383190758,"url":"https:\/\/community.smartsheet.com\/discussion\/108733\/combining-multiple-if-or-statements","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/108733\/combining-multiple-if-or-statements","format":"Rich","tagIDs":[254],"lastPost":{"discussionID":108733,"commentID":389831,"name":"Re: Combining multiple IF(OR statements","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/389831#Comment_389831","dateInserted":"2023-08-09T15:39:06+00:00","insertUserID":154566,"insertUser":{"userID":154566,"name":"Draykov","url":"https:\/\/community.smartsheet.com\/profile\/Draykov","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/YUD6MF5OSNWQ\/nCTGFDW964F4K.png","dateLastActive":"2023-08-09T16:06:28+00:00","banned":0,"punished":0,"private":false,"label":"✭✭"}},"breadcrumbs":[{"name":"Home","url":"https:\/\/community.smartsheet.com\/"},{"name":"Get Help","url":"https:\/\/community.smartsheet.com\/categories\/get-help"},{"name":"Smartsheet Basics","url":"https:\/\/community.smartsheet.com\/categories\/smartsheet-basics%2B"}],"groupID":null,"statusID":3,"attributes":{"question":{"status":"accepted","dateAccepted":"2023-08-09T15:33:00+00:00","dateAnswered":"2023-08-09T15:20:07+00:00","acceptedAnswers":[{"commentID":389820,"body":"

Hi @Draykov<\/a>,<\/p>

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:<\/p>

=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\")))<\/p>

Give this a whirl and it should work for you - if there are still issues then post what error you're getting! 😊<\/span><\/p>"},{"commentID":389821,"body":"

Hey @Draykov<\/a>. Looks like it's just placement of parentheses! Try the below<\/p>

=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\")))<\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question"},"bookmarked":false,"unread":false,"category":{"categoryID":321,"name":"Smartsheet Basics","url":"https:\/\/community.smartsheet.com\/categories\/smartsheet-basics%2B","allowedDiscussionTypes":[]},"reactions":[{"tagID":3,"urlcode":"Promote","name":"Promote","class":"Positive","hasReacted":false,"reactionValue":5,"count":0},{"tagID":5,"urlcode":"Insightful","name":"Insightful","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":11,"urlcode":"Up","name":"Vote Up","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":13,"urlcode":"Awesome","name":"Awesome","class":"Positive","hasReacted":false,"reactionValue":1,"count":0}],"tags":[{"tagID":254,"urlcode":"Formulas","name":"Formulas"}]},{"discussionID":108718,"type":"question","name":"If statement help.","excerpt":"I have two columns I am using in my smartsheet, \"responsible\" and \"assigned to\" I need a formula that will display the \"responsible\" only if the \"assigned to\" is blank, and if not it will display the \"assigned to\". I have tried to write and IF statement but cannot get to work. Any help would be appreciated.","snippet":"I have two columns I am using in my smartsheet, \"responsible\" and \"assigned to\" I need a formula that will display the \"responsible\" only if the \"assigned to\" is blank, and if not…","categoryID":321,"dateInserted":"2023-08-09T13:24:29+00:00","dateUpdated":null,"dateLastComment":"2023-08-09T15:40:18+00:00","insertUserID":163745,"insertUser":{"userID":163745,"name":"dminor764","title":"CI Manager","url":"https:\/\/community.smartsheet.com\/profile\/dminor764","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-08-09T21:12:08+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"updateUserID":null,"lastUserID":8888,"lastUser":{"userID":8888,"name":"Andrée Starå","title":"Smartsheet Expert Consultant & Partner | Workflow Consultant \/ CEO @ WORK BOLD","url":"https:\/\/community.smartsheet.com\/profile\/Andr%C3%A9e%20Star%C3%A5","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/0PAU3GBYQLBT\/nXWM7QXGD6464.jpg","dateLastActive":"2023-08-10T00:12:52+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":4,"countViews":47,"score":null,"hot":3383185487,"url":"https:\/\/community.smartsheet.com\/discussion\/108718\/if-statement-help","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/108718\/if-statement-help","format":"Rich","lastPost":{"discussionID":108718,"commentID":389832,"name":"Re: If statement help.","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/389832#Comment_389832","dateInserted":"2023-08-09T15:40:18+00:00","insertUserID":8888,"insertUser":{"userID":8888,"name":"Andrée Starå","title":"Smartsheet Expert Consultant & Partner | Workflow Consultant \/ CEO @ WORK BOLD","url":"https:\/\/community.smartsheet.com\/profile\/Andr%C3%A9e%20Star%C3%A5","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/0PAU3GBYQLBT\/nXWM7QXGD6464.jpg","dateLastActive":"2023-08-10T00:12:52+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"}},"breadcrumbs":[{"name":"Home","url":"https:\/\/community.smartsheet.com\/"},{"name":"Get Help","url":"https:\/\/community.smartsheet.com\/categories\/get-help"},{"name":"Smartsheet Basics","url":"https:\/\/community.smartsheet.com\/categories\/smartsheet-basics%2B"}],"groupID":null,"statusID":3,"attributes":{"question":{"status":"accepted","dateAccepted":"2023-08-09T13:46:38+00:00","dateAnswered":"2023-08-09T13:28:21+00:00","acceptedAnswers":[{"commentID":389758,"body":"

Try this:<\/p>

=IF(ISBLANK([assigned to]@row), [responsible]@row, [assigned to]@row)<\/p>"},{"commentID":389761,"body":"

\n
\n \n \"image.png\"<\/img><\/a>\n <\/div>\n<\/div>\n

=IF(ISBLANK([Assigned to]@row), Responsible@row, [Assigned to]@row)<\/code><\/p>

Hope this helps!<\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question"},"bookmarked":false,"unread":false,"category":{"categoryID":321,"name":"Smartsheet Basics","url":"https:\/\/community.smartsheet.com\/categories\/smartsheet-basics%2B","allowedDiscussionTypes":[]},"reactions":[{"tagID":3,"urlcode":"Promote","name":"Promote","class":"Positive","hasReacted":false,"reactionValue":5,"count":0},{"tagID":5,"urlcode":"Insightful","name":"Insightful","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":11,"urlcode":"Up","name":"Vote Up","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":13,"urlcode":"Awesome","name":"Awesome","class":"Positive","hasReacted":false,"reactionValue":1,"count":0}],"tags":[]}],"initialPaging":{"nextURL":"https:\/\/community.smartsheet.com\/api\/v2\/discussions?page=2&categoryID=321&includeChildCategories=1&type%5B0%5D=Question&excludeHiddenCategories=1&sort=-hot&limit=3&expand%5B0%5D=all&expand%5B1%5D=-body&expand%5B2%5D=insertUser&expand%5B3%5D=lastUser&status=accepted","prevURL":null,"currentPage":1,"total":4935,"limit":3},"title":"Trending in Smartsheet Basics","subtitle":null,"description":null,"noCheckboxes":true,"containerOptions":[],"discussionOptions":[]}">

Trending in Smartsheet Basics