How do I extract the left most word in a Column?
I'm looking for a formula to extract the left-most word form a column that will have different character lengths.
Looking at the example below:
- Sometimes there is a / in front of that left-most word
- Sometimes its just a single word
- Sometimes there is a < in front of the left-most word
Thank you!
Best Answers
-
Try something like this...
=IF(FIND("<", [Parent Trailing]@row)> 0, LEFT([Parent Trailing]@row, FIND("<", [Parent Trailing]@row) - 1), IF(FIND("/", [PArent Trailing]@row)> 0, LEFT([Parent Trailing]@row, FIND("/", [Parent Trailing]@row) - 1), [Parent Trailing]@row))
-
Here is a little tweak:
=IFERROR(MID([Parent Trailing]@row, FIND("/", [Parent Trailing]@row) + 2, FIND("/", [Parent Trailing]@row, FIND("/", [Parent Trailing]@row) + 2) - (FIND("/", [Parent Trailing]@row) + 2)), MID([Parent Trailing]@row, FIND("/", [Parent Trailing]@row) + 2, LEN([Parent Trailing]@row) - (FIND("/", [Parent Trailing]@row))))
Answers
-
Try something like this...
=IF(FIND("<", [Parent Trailing]@row)> 0, LEFT([Parent Trailing]@row, FIND("<", [Parent Trailing]@row) - 1), IF(FIND("/", [PArent Trailing]@row)> 0, LEFT([Parent Trailing]@row, FIND("/", [Parent Trailing]@row) - 1), [Parent Trailing]@row))
-
As always, you saved me hours of frustration! Thank you Paul.
-
Happy to help. 👍️
-
Hey @Paul Newcome - How would I tweak the formula to now pull the word after the / ?
I've tried tweaking the "<" symbols or the "-1" but havent had luck. In the screenshot below I'm either trying to pull the word "Plan", "Execute" or "Closing".
Thank you!
-
Give this one a go...
=IFERROR(MID([Parent Trailing]@row, FIND("/", [Parent Trailing]@row) + 2, FIND("/", [Parent Trailing]@row, FIND("/", [Parent Trailing]@row) + 2) - (FIND("/", [Parent Trailing]@row) + 2)), MID([Parent Trailing]@row, FIND("/", [Parent Trailing]@row) + 2, LEN([Parent Trailing]@row) - (FIND("/", [Parent Trailing]@row) + 2)))
-
That one works but only if there is / after the second "/".
Otherwise as shown below it will pull the the second word after the first "/" but leave out the last letter.
-
Here is a little tweak:
=IFERROR(MID([Parent Trailing]@row, FIND("/", [Parent Trailing]@row) + 2, FIND("/", [Parent Trailing]@row, FIND("/", [Parent Trailing]@row) + 2) - (FIND("/", [Parent Trailing]@row) + 2)), MID([Parent Trailing]@row, FIND("/", [Parent Trailing]@row) + 2, LEN([Parent Trailing]@row) - (FIND("/", [Parent Trailing]@row))))
-
Thank you Paul!
-
Happy to help. 👍️
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 63.9K Get Help
- 410 Global Discussions
- 220 Industry Talk
- 458 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 137 Just for fun
- 57 Community Job Board
- 459 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 298 Events
- 37 Webinars
- 7.3K Forum Archives