Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 34
Default 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


  #2   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,272
Default 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




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Switching Text Felix Excel Discussion (Misc queries) 4 May 24th 07 01:33 PM
Switching Information zephyr Excel Discussion (Misc queries) 2 February 21st 06 07:25 AM
Switching cells DrJBN Excel Discussion (Misc queries) 5 May 6th 05 10:45 PM
Switching Sheets RogeR Excel Programming 1 June 10th 04 02:36 AM
Switching userfoms Tom Ogilvy Excel Programming 0 September 10th 03 04:58 PM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"