Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default remove anything before period in column

Dear all,

I recently imported some data in excel from a .csv file only to find thta
column O (containing last names) has been corrupted somehow. some last
names are mixed up with the last 1 or 2 character of the middle name
e.g S.Simon should really be simon. I would like to get a macro which will
loop through column O and remove anything before a period. In some cases
column may have 2 periods e.g M.G.Taylor when I only want Taylor. The macro
should remove everything before Taylor

Please assist

Many thanks



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 227
Default remove anything before period in column

Hi

To do it without a macro.....
Select Column O
From Excel toolbar, "EditReplace"
In the "Find What" box, enter (without inverted commas) "*."
Leave the "Replace With" box empty.

To do it with a macro.....
Sub Test()
Columns("O:O").Replace What:="*.", Replacement:="", LookAt:=xlPart
End Sub

--
XL2002
Regards

William


"stat" wrote in message
...
| Dear all,
|
| I recently imported some data in excel from a .csv file only to find thta
| column O (containing last names) has been corrupted somehow. some last
| names are mixed up with the last 1 or 2 character of the middle name
| e.g S.Simon should really be simon. I would like to get a macro which
will
| loop through column O and remove anything before a period. In some cases
| column may have 2 periods e.g M.G.Taylor when I only want Taylor. The
macro
| should remove everything before Taylor
|
| Please assist
|
| Many 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
Remove period "." from cells Eric S.[_2_] Excel Discussion (Misc queries) 4 April 2nd 23 02:59 PM
How to sum up the value in column based on a 5 day week period? Peter Gonzalez[_2_] Excel Worksheet Functions 1 March 2nd 10 09:29 PM
count number of dates in a column that are within a month period.. Sarah J Excel Worksheet Functions 7 May 24th 07 06:53 PM
Sum column based on value in each row, if two cells equal, or if date is within time period [email protected] Excel Worksheet Functions 8 September 25th 06 02:40 PM
Period to Period percentage change? cs120 Excel Discussion (Misc queries) 1 September 18th 05 12:05 PM


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

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"