View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
JBeaucaire[_90_] JBeaucaire[_90_] is offline
external usenet poster
 
Posts: 222
Default Transposing contents of a cell

This will work on the original cell, swapping the first and last name
positions and removing the middle initial. Name is in cell A2:

=RIGHT(A2,LEN(A2)-FIND(".",A2)-1)&" "&LEFT(A2,FIND(",",A2)-1)

This will work on the original data even if there is NO middle initial (with
full stop) listed, so one formula will work for the whole column, regardless:

=IF(ISNUMBER(SEARCH(".",A2)),
RIGHT(A2,LEN(A2)-FIND(".",A2)-1)&" "&
LEFT(A2,FIND(",",A2)-1),
RIGHT(A2,LEN(A2)-FIND(", ",A2)-1)&" "&
LEFT(A2,FIND(", ",A2)-1))

Hope that helps.
--
"Actually, I *am* a rocket scientist." -- JB

Your feedback is appreciated, click YES if this post helped you.


"Pete_UK" wrote:

Assuming that you now have:

M. Tracey

in C1, then you could use this in D1 to remove the first 3 characters
if there is a full-stop in the

=IF(ISNUMBER(SEARCH(".",C1)),RIGHT(C1,LEN(C1)-3),C1)

Copy down as required.

Hope this helps.

Pete


On Jan 15, 4:17 pm, Fran <Fran @discussions.microsoft.com wrote:
I have an Excel spreadsheet with a column containing general text data in
the format e.g:-

Roberts, M. Tracey

which I want in the format:-

Tracey Roberts

I've managed to separate into 2 cells using the comma as a delimiter but now
want to get rid of the middle inital and fullstop. Any ideas gratefully
received