I'm trying to clean up a sheet of about 4500 entries. I have some entries where the first and last name are in the same cell and some where they're not. Is there a quick way to say If B is not found in A then add the contents of A and B in C? Thanks.
Asked
Active
Viewed 36 times
0
-
Welcome! Do you mean `=IF(SUBSTITUTE(A1;B1;"")=A1;A1&" "&B1;A1)`? – JohnSUN Feb 27 '23 at 17:21
-
Please check `=IF(ISNUMBER(FIND(B1,A1)),"",A1&" "&B1)`. – Emily Feb 28 '23 at 07:44
1 Answers
1
Use SEARCH to test if there:
=A1&IF(ISNUMBER(SEARCH(B1,A1)),""," "&B1)
If it is found the IF returns an empty string to concatenate to A1 if it is not found then it return a space and the value in B.
Or you can just try to remove the value in B and concatenate B:
=SUBSTITUTE(A1," "&B1,"")&" "&B1
This will remove B from A if found and then just concatenate B onto A.
Scott Craner
- 22,693
- 3
- 21
- 25


