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: 78
Default Clean Up Phone and Fax Numbers

Here's a macro I have for cleaning up fax (or phone) numbers. Our sales
people enter all kinds of random items in the fax field and I use this to
take out all the extra info. I have three questions.

1. How can I take out the double quotation symbol?
2. How can I take out alphabetic characters without listing every single
letter? or is that possible?
3. Is there a better way to do this?

Thank you,
Billy Rogers
Dallas, TX

Sub CleanUP()
Dim c As Range

For Each c In Selection.Cells
c = Replace(c, " ", "")
c = Replace(c, "-", "")
c = Replace(c, ".", "")
c = Replace(c, ",", "")
c = Replace(c, "'", "")
c = Replace(c, "*", "")
c = Replace(c, ";", "")
c = Replace(c, "#", "")
c = Replace(c, "@", "")
c = Replace(c, "^", "")
c = Replace(c, "(", "")
c = Replace(c, ")", "")
c = Replace(c, "$", "")
c = Replace(c, "%", "")
c = Replace(c, "_", "")
c = Replace(c, "\", "")
c = Replace(c, "|", "")
c = Replace(c, "/", "")
c = Replace(c, "<", "")
c = Replace(c, "", "")
c = Replace(c, "?", "")
c = Replace(c, "!", "")
c = Replace(c, "+", "")
c = Replace(c, "`", "")
c = Replace(c, "~", "")
c = Replace(c, "&", "")
c = Replace(c, ":", "")
c = Replace(c, "[", "")
c = Replace(c, "]", "")
c = Replace(c, "{", "")
c = Replace(c, "}", "")



Next

End Sub

 
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
phone numbers Tony R New Users to Excel 4 August 13th 07 04:44 PM
Convert phone numbers with dashes in them to just numbers J H Excel Discussion (Misc queries) 2 June 23rd 06 06:56 PM
Convert phone numbers with dashes in them to just numbers J H Excel Discussion (Misc queries) 2 June 23rd 06 02:40 AM
How can I cross reference phone numbers with existing phone numbe. John Excel Discussion (Misc queries) 1 February 11th 05 04:39 PM
Words > Numbers (i.e. Vanity Phone Numbers) function Don Excel Worksheet Functions 1 December 29th 04 06:10 PM


All times are GMT +1. The time now is 12:39 PM.

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"