Remove space and the letter after
Hi -
I have a column with a list of names. Some name has first name, a space then middle initial and some has only the first name. See below example.
I'm trying to work a formula that take only the first name without the middle initial. I tried this =LEFT([First Name]@row, FIND(" ", [First Name]@row) - 1), but it show #invalid value on the one without initial.
Is there a formula that works all?
Thanks in advance!
Best Answer
-
Yes, wrap your formula in an IFERROR formula. This should do the trick for you. If there is an error because there is no space, then it will just use the first name at row.
=IFERROR(LEFT([First Name]@row, FIND(" ", [First Name]@row) - 1), [First Name]@row
Answers
-
Yes, wrap your formula in an IFERROR formula. This should do the trick for you. If there is an error because there is no space, then it will just use the first name at row.
=IFERROR(LEFT([First Name]@row, FIND(" ", [First Name]@row) - 1), [First Name]@row
-
This is exactly what I'm looking for! THANK YOU!! 😀
-
You're welcome! :)
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.3K Get Help
- 419 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 142 Just for fun
- 58 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 300 Events
- 39 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!