#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default cell order

I have two spread sheets with names of the same people on
them with different info on each. The master workbook
has the names in a cell as a FIRST LAST format. I want
to bring data in from another workwork which has the
names listed as LAST, FIRST. is there a marco which will
go through a column and switch the order? thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 102
Default cell order

Chris,

This should work

Sub NameSwitch()
For Each Cell In Selection
a = InStr(1, Cell.Text, ",")
Last = Mid(Cell.Value, 1, a - 1)
First = Mid(Cell.Value, a + 2)
Cell.Value = First & " " & Last
Next
End Sub

Dan E

"Chris" wrote in message ...
I have two spread sheets with names of the same people on
them with different info on each. The master workbook
has the names in a cell as a FIRST LAST format. I want
to bring data in from another workwork which has the
names listed as LAST, FIRST. is there a marco which will
go through a column and switch the order? thanks



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 102
Default cell order

I should have mentioned, back up before you try it, because their is no Undo!

"Chris" wrote in message ...
I have two spread sheets with names of the same people on
them with different info on each. The master workbook
has the names in a cell as a FIRST LAST format. I want
to bring data in from another workwork which has the
names listed as LAST, FIRST. is there a marco which will
go through a column and switch the order? thanks



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
How to change series plotting order without changing legend order? PatrickM Charts and Charting in Excel 6 December 2nd 09 07:43 PM
For chart syles, why doesn't color order match series order? AMiller Charts and Charting in Excel 1 October 29th 09 12:02 AM
how to set a tab order in Excel 2003 for PC? (go cell to cell) SFTaxMan Excel Discussion (Misc queries) 2 May 11th 09 10:52 PM
How stop Excel file UK date order changing to US order in m.merge Roger Aldridge Excel Discussion (Misc queries) 1 October 9th 07 11:52 PM
Daily Macro to Download Data, Order and paste in order Iarla Excel Worksheet Functions 1 November 17th 04 01:59 PM


All times are GMT +1. The time now is 06:50 PM.

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

About Us

"It's about Microsoft Excel"