Quantcast
Channel: Excel Help Forum - Excel Programming / VBA / Macros
Viewing all articles
Browse latest Browse all 50061

Macro to fix phone numbers

$
0
0
Hello! So I need help with a macro. I'm totally new to macros so I don't really understand how much of it works. I have data from US phone numbers currently, but later on I'll have phone numbers from Switzerland/GB/Australia/etc. Currently though, I'd like to focus on the macro for US phone numbers.

What I need the macro to do is take phone numbers from such formats: 123.123.1234, 123-123-1234, 123 123 1234, 1231231234, etc. and have them changed to (123) 123-1234.

It would also be preferable if the macro could tackle a whole column. In this case I need the macro to change data in column "S". And it would be nice if I could just change the column ID within the macro later on so the macro can focus on other columns after it has finished one. If that makes sense.

* If anyone does have a macro to change out-of-country phone numbers (e.g. (0x) xxxx xxxx or xxxxx-xxxxxx) into the (123) 123-1234 format, that would be great! My data does have MailingCountry ID's as well. Which are organized as United States of America, Switzerland, Australia, Uruguay, etc.

Thank you for any help!

Viewing all articles
Browse latest Browse all 50061

Trending Articles