Replace text

D

Don

I have a column of names. On any cell that ENDS with a
space followed by a single character (regardless of what
it is)I want to remove the space and character.

Ex: Williams, Henry B would change to
Williams, Henry
 
K

Ken Wright

Assuming your data in Col A, in cell B1 put the following formula and copy down

=IF(ISERROR(SEARCH(" ?",RIGHT(A1,2))),A1,LEFT(A1,LEN(A1)-2))

Then copy the data in Col B, paste special as values over A and delete Col B
 
D

Doug Kanter

Cool. :) I think you've won a virtual beer. Place mug in CD-ROM drawer and
hit RightShift-Ctrl-Alt-Spacebar-Tilde-NumLock-Uppercase B. Don't spill.
 
Top