ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Switching Names Around (https://www.excelbanter.com/excel-programming/307160-switching-names-around.html)

D[_6_]

Switching Names Around
 
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



Bob Phillips[_6_]

Switching Names Around
 
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)

"D" wrote in message news:9%hUc.58512$Oi.14233@fed1read04...
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






All times are GMT +1. The time now is 08:05 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com