Hello,
I have to clean up a dataset of names by removing a middle name if it has been included with the firstname.
So, I'm using the following formula to look for a space, return the cell itself if there is no space, or just the first word if there is a space.
I know the formula is in German, so that is why I have given the English version underneath. (My German isn't good enough to write the question.)
=WENN(NICHT(FINDEN(" ";B3;1));B3;LINKS(B3;FINDEN(" ";B3;1)-1))
= IF(ISERROR(FIND(" ",B3,1)),B3,LEFT(B3,FIND(" ",B3,1)-1))
The formula works if there is a second name in the cell, but returns a #NO VALUE! (#WERT!) error if there is just one name by itself.
How can I get the cell value to be returned when there is just one name present in the cell?
I have to clean up a dataset of names by removing a middle name if it has been included with the firstname.
So, I'm using the following formula to look for a space, return the cell itself if there is no space, or just the first word if there is a space.
I know the formula is in German, so that is why I have given the English version underneath. (My German isn't good enough to write the question.)
=WENN(NICHT(FINDEN(" ";B3;1));B3;LINKS(B3;FINDEN(" ";B3;1)-1))
= IF(ISERROR(FIND(" ",B3,1)),B3,LEFT(B3,FIND(" ",B3,1)-1))
The formula works if there is a second name in the cell, but returns a #NO VALUE! (#WERT!) error if there is just one name by itself.
How can I get the cell value to be returned when there is just one name present in the cell?