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
Check out the Formula Handbook template!