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
- 10.7K Get Help
- 63 Global Discussions
- 68 Industry Talk
- 385 Announcements
- 3.5K Ideas & Feature Requests
- 55 Brandfolder
- 125 Just for fun
- 50 Community Job Board
- 464 Show & Tell
- 40 Member Spotlight
- 44 Power Your Process
- 28 Sponsor X
- 234 Events
- 7.3K Forum Archives