0

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.

enter image description here

Scott Craner
  • 22,693
  • 3
  • 21
  • 25
H00pak
  • 1

1 Answers1

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.

enter image description here


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.

enter image description here

Scott Craner
  • 22,693
  • 3
  • 21
  • 25