Format Phone Number Field VBA

T

Tony

I have a field that I am placing a phone number into as:

1234567890

I want it to be formatted as

(123) 456- 7890

How can I do that if my code is currently:

wsPh.Range("G6") = wsMaster.Range("AS" & iRow + 0)
 
S

Sheeloo

Try
wsPh.Range("G6").NumberFormat = "(000) 000-0000"
wsPh.Range("G6").Value = wsMaster.Range("AS" & iRow + 0)
 
S

Sheeloo

Try
wsPh.Range("G6").NumberFormat = "(000) 000-0000"
wsPh.Range("G6").Value = wsMaster.Range("AS" & iRow + 0)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top