Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 313
Default Format Phone Number Field VBA

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)

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 793
Default Format Phone Number Field VBA

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


"Tony" wrote:

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)

Reply
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
format a cell with a phone number - how? Martin ©¿©¬ @nohere.net Excel Discussion (Misc queries) 4 March 29th 09 03:45 PM
phone number format [email protected] Excel Worksheet Functions 2 January 21st 08 10:40 AM
phone number format Omar Excel Discussion (Misc queries) 3 January 21st 08 10:20 AM
Format change of phone number helpjim Excel Discussion (Misc queries) 7 May 18th 06 07:34 PM
how do I add phone number format as a permanent custom format? frustratedagain Excel Discussion (Misc queries) 3 February 4th 06 03:52 AM


All times are GMT +1. The time now is 11:28 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"