LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default need macro to clean up telephone numbers

I have two columns (A:B) of data in my spreadsheet where people enter
telephone numbers. To enforce the integrity of the data in these columns, I
need a macro that will select columns A:B and remove all non-numerical
characters. 0-9 is all I want. I need to remove spaces and the a host of
other things such as dash, slash, dot, and parenthesis.
I have a macro that trims the leading spaces, and runs through a long
find/replace routine, but I wondered if there is a more graceful and better
way to remove everything that isn't a number 0-9 from these range of cells.

For example: 919-123-4567 or 919.123.4567 would become 9191234567

Any suggestions?
 
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
Telephone Numbers Kennel slave New Users to Excel 3 January 8th 08 04:56 PM
formula for telephone numbers. biffula Excel Discussion (Misc queries) 6 November 2nd 07 08:56 PM
Looking up Telephone Numbers Peterp Excel Discussion (Misc queries) 3 March 19th 07 04:43 PM
Can I format telephone numbers? SouthAfricanStan Excel Worksheet Functions 3 August 24th 06 08:14 PM
how do i format telephone numbers Vin Excel Discussion (Misc queries) 1 May 30th 05 02:46 AM


All times are GMT +1. The time now is 04:29 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"