LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 30
Default Specialized custom number format

I would like to construct a formula or custom number format (or VB code?)
that will do the following:

This would all occur within a single column.

If a five digit phone extension beginning with a 1 is entered (e.g., 12345),
I would like Excel to automatically add the area code and first two digits of
an extension. Example result: (212) 551-2345

If a five digit extension beginning with a 2 is entered (23456) I would like
the result to be (212) 662-3456. And if a five digit extension beginning
with a 3 is entered (34567), the the result should be (212) 773-4567. And so
on...

If a seven digit number is entered, Excel should add the area code - e.g.,
enter 5123456, result should be (212) 512-3456.

If a full telephone number is entered (e.g., 7076123456), it should just
format as a phone number, (707) 612-3456.

Anyone have thoughts, suggestions, brilliant solutions?

Thank you!


 
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
Custom number format for driver's license number excel user Excel Discussion (Misc queries) 10 July 16th 08 10:05 PM
Moving custom number format to NUMBER Doug Boufford Setting up and Configuration of Excel 3 July 23rd 07 11:58 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
Format a cell with a custom number format Armor Excel Worksheet Functions 4 January 29th 06 11:25 PM
Custom number format always defaults last number to 0. scubadave Excel Discussion (Misc queries) 2 June 15th 05 10:20 PM


All times are GMT +1. The time now is 12:54 PM.

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

About Us

"It's about Microsoft Excel"