PDA

View Full Version : Solved: Delete all info other than name on left side of cell.



Barryj
06-28-2011, 11:16 PM
I have attached a file with info in column A, does anyone know how I could delete all the info on the right of the name.

I only want the name of the person to be left; line 5 for instance would be left with Warren, J and nothing else.

As everyones names are different lengths I think this may not be able to be done, any thoughts or ideas would be greatly appreciated.

Bob Phillips
06-28-2011, 11:53 PM
Not perfect, but try this

=TRIM(SUBSTITUTE(LEFT(A1&"[(",MIN(FIND("(",A1&"("),FIND("[",A1&"["))-1)," #",""))

Barryj
06-29-2011, 12:57 AM
Thanks XLD thats seems to be working ok, is it possible to turn this into a vba solution so that I can push a button and have it do the same thing.

Thanks