Hello everyone - back again for more torture. I am trying to conduct a find and replace in excel via vba that will find phone numbers in the format of 000.000.000 and change them to 000-000-000. Any suggestions!
Hello everyone - back again for more torture. I am trying to conduct a find and replace in excel via vba that will find phone numbers in the format of 000.000.000 and change them to 000-000-000. Any suggestions!
hi, here is the code...dont forget to solved the post and to give me a star :D
![]()
Sub ReplacePhone() ' ' ReplacePhone Macro ' ' Cells.Select Selection.Replace What:="000.000.000", Replacement:="000-000-000", LookAt _ :=xlPart, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _ ReplaceFormat:=False End Sub
I need for the 0's to be any number from 0-9.
well..that would be another post...this one is over....
solved this post then start another one![]()
Why not just use regular Find/Replace?
highlight the data, press ctrl H....find . replace -
@ extremis the OP's querstion is not solved, and they do not need to start a new 1, seems to me you mis-understood the requirement![]()
Last edited by FDibbins; 06-28-2013 at 04:23 PM.
1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
2. If your question is resolved, mark it SOLVED using the thread tools
3. Click on the star if you think someone helped you
Regards
Ford
Regular find and replace is not what I am looking for in this solution. If I conduct a regular find/replace it will replace all periods within my data and not just the phone number periods. The phone number in the cells is surrounded by other text as it's a description column for vendors. I am creating a scrub data macro to eliminate repetitive data entry tasks within proofing files.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks