ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   FORMATING PHONE NUMBER!! (https://www.excelbanter.com/excel-programming/427235-formating-phone-number.html)

Jay Dean

FORMATING PHONE NUMBER!!
 
In Range("H2") is a 10-digit number. How do I format the cell to show
the number in the format ###-###-####. Example: Entering 1478942266
should convert to 147-894-2266.

Any help would be appreciated!
Jay

*** Sent via Developersdex http://www.developersdex.com ***

Rick Rothstein

FORMATING PHONE NUMBER!!
 
Select Format/Cells from Excel's menu bar, select the Number tab on the
dialog box that comes up, select Custom from the Category list and then put
this into the Type field...

000-000-0000

--
Rick (MVP - Excel)


"jay dean" wrote in message
...
In Range("H2") is a 10-digit number. How do I format the cell to show
the number in the format ###-###-####. Example: Entering 1478942266
should convert to 147-894-2266.

Any help would be appreciated!
Jay

*** Sent via Developersdex http://www.developersdex.com ***



Jacob Skaria

FORMATING PHONE NUMBER!!
 
Select the column or the cells. Right click--Format Cells-- Custom..Type
text box enter the below

###-###-####


If this post helps click Yes
---------------
Jacob Skaria


"jay dean" wrote:

In Range("H2") is a 10-digit number. How do I format the cell to show
the number in the format ###-###-####. Example: Entering 1478942266
should convert to 147-894-2266.

Any help would be appreciated!
Jay

*** Sent via Developersdex http://www.developersdex.com ***


Jacob Skaria

FORMATING PHONE NUMBER!!
 
If you are looking for VBA use FORMAT

Msgbox Format("1234567890","###-###-####")

If this post helps click Yes
---------------
Jacob Skaria


"jay dean" wrote:

In Range("H2") is a 10-digit number. How do I format the cell to show
the number in the format ###-###-####. Example: Entering 1478942266
should convert to 147-894-2266.

Any help would be appreciated!
Jay

*** Sent via Developersdex http://www.developersdex.com ***


Jay Dean

FORMATING PHONE NUMBER!!
 
Thank you, Rick and Jacob Skaria !
It works !!

Jay

*** Sent via Developersdex http://www.developersdex.com ***


All times are GMT +1. The time now is 01:52 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com