Help on Or/Contains formula
I am in the need of some help as I am banging my head against the wall trying different formula options here.
I wish to grab all characters left of a certain character combination (" -") from a drop-down cell. For instance, I wish to grab "Hosted Event (physical)" from the drop-down cell with "Hosted Event (physical) - Regional". This is the formula I am working with...what I am missing:
=IF (OR (CONTAINS ("Hosted", [Channel + Channel Tag]@row), CONTAINS ("Sponsored", [Channel + Channel Tag]@row), CONTAINS ("Webinar", [Channel + Channel Tag]@row)), LEFT ( FIND (" -", [Channel + Channel Tag]@row -20)), [Channel + Channel Tag]@row)
Thanks for your keen eyes!! Cheers, James
Answers
-
Try this:
=LEFT([Channel + Channel Tag]@row, FIND(" -", [Channel + Channel Tag]@row) -1)
-
Thanks Paul for chiming in! I plugged that into the larger formula, but unfortunately still "#UNPARSEABLE". FYI, the field header name had to change, so it's slightly different now.
=IF (OR (CONTAINS ("Hosted", [Channel + Channel Category]@row), CONTAINS ("Sponsored", [Channel + Channel Category]@row), CONTAINS ("Webinar", [Channel + Channel Category]@row)), LEFT([Channel + Channel Category]@row, FIND(" -", [Channel + Channel Category]@row) -1))
-
Lets try cleaning up the spaces and parenthesis.
=IF(OR(CONTAINS("Hosted", [Channel + Channel Category]@row), CONTAINS("Sponsored", [Channel + Channel Category]@row), CONTAINS("Webinar", [Channel + Channel Category]@row)), LEFT([Channel + Channel Category]@row, FIND(" -", [Channel + Channel Category]@row) -1))
-
THANK YOU! I didn't see any parenthesis changes, but this worked. Crazy that spaces would impact this.
Now would this statement continue to hold true if LEFT was replaced by RIGHT? Cheers!!
-
For the right, you would need to use
RIGHT([Channel + Channel Category]@row, LEN([Channel + Channel Category]@row) - (FIND(" -", [Channel + Channel Category]@row) + 2))
or
SUBSTITUTE([Channel + Channel Category]@row, LEFT([Channel + Channel Category]@row, FIND(" -", [Channel + Channel Category]@row) -1), "", 1)
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 63.9K Get Help
- 410 Global Discussions
- 219 Industry Talk
- 457 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 136 Just for fun
- 57 Community Job Board
- 459 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 298 Events
- 37 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!