Switching Names Around

  • Thread starter Thread starter D
  • Start date Start date
D

D

Hey gurus-
I am getting a list of names imported into Excel. All the names are in the
order of LAST NAME FIRST MI/[SPOUSE] FIRST [SPOUSE] MI. All of them have
their last name at the beginning, and they're all merged into the same cell.
I am trying to print out mailers, so I need the 1st name moved to the back
of the line so it prints out normally. How would I write a macro to do this?
The only way I can think of is to signal is off the very 1st SPACE-
everything before that space gets added to the end of the line. Is this
possible to do? How do I do this? I'm not very good at VB, so I don't know
where to even start on this one...
example-
My Data- Smith John D/Jane A

I need- John D & Jane A Smith

Thanks!
D
 
You don't need VBA, this formula will do it if all structured as per your
example

=SUBSTITUTE(MID(A1,FIND(" ",A1)+1,255)&" "&LEFT(A1,FIND(" ",A1)),"/"," & ")

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Back
Top