format cell values to phone number format
excel, vba
Solution
The periods need to be converted to text, otherwise they're read as decimal points:
Worksheets("Sheet1").Range("A1").NumberFormat = "###"".""###"".""####"
Problem
I have phone numbers listed in Column A of Sheet1. Currently they dont have any format and are stored as: 1112223333 I want to convert them to: 111.222.3333 I tried: ``` Format(Worksheets("Sheet1").Range("A1").Value, "###.###.####") ``` which gives me "1112223333.." EDIT: When I try to format it to: ``` Format(Worksheets("Sheet1").Range("A1").Value, "(###) ###-####") ``` It works perfectly fine: (111) 222-3333 Its just with the "111.222.3333" format that I am having issues with. Am I missing something here? Thanks in advance