MrExcel Message Board

Go Back   MrExcel Message Board > Question Forums > Excel Questions

Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only.

Reply
 
Thread Tools Display Modes
Old Mar 13th, 2002, 07:43 AM   #1
Guest
 
Posts: n/a
Default

I want to use a custom format for phone numbers, the one excel has uses () I want to use –
Ex. Numbers entered as 2222222 1232222222 18002222222 should be formatted as 222-2222 123-222-2222 1-800-222-2222. Can this be done by a custom format? I have tried to modified the format for phone numbers but cant get it to work. Thanks
  Reply With Quote
Old Mar 13th, 2002, 07:51 AM   #2
kinkyparamour
Board Regular
 
Join Date: Feb 2002
Location: Florida
Posts: 82
Default

Go to format cells, custom. Type in ###-#### for the first number. Go Back to custom and type in ###-###-####. Continue this till all your custom numbers are installed.

[ This Message was edited by: kinkyparamour on 2002-03-13 06:55 ]
kinkyparamour is offline   Reply With Quote
Old Mar 13th, 2002, 07:52 AM   #3
lenze
MrExcel MVP
 
lenze's Avatar
 
Join Date: Feb 2002
Location: Helena, MT
Posts: 13,690
Default

Try something like this:

[>9999999](000)000-0000;000-0000 You may need to modify it to include the 1 prefix, such as [>9999999]1-(000)000-0000;000-0000 wher the user would not enter the leading 1.
lenze is offline   Reply With Quote
Old Mar 13th, 2002, 08:05 AM   #4
Mark W.
MrExcel MVP
 
Join Date: Feb 2002
Location: Austin, Texas USA
Posts: 11,654
Default

A "number" entered as "2222222 1232222222 18002222222" will not be treated as a numeric value by Excel because of the imbedded space characters and; therefore, its display will not be governed by an custom number format. Furthermore, if you exclude the spaces the value will exceeds Excel limit of 15-digit integers.
Mark W. is offline   Reply With Quote
Old Mar 13th, 2002, 08:06 AM   #5
Guest
 
Posts: n/a
Default

I need to be able to format the whole column as one format and it will change the numbers as need based on what was entered
  Reply With Quote
Old Mar 13th, 2002, 08:32 AM   #6
Mark W.
MrExcel MVP
 
Join Date: Feb 2002
Location: Austin, Texas USA
Posts: 11,654
Default

Quote:
On 2002-03-13 07:06, Anonymous wrote:
I need to be able to format the whole column as one format and it will change the numbers as need based on what was entered
See my posting above. You cannot enter these as numeric values. Custom number format can only be applied to numeric values.
Mark W. is offline   Reply With Quote
Old Mar 13th, 2002, 08:35 AM   #7
kinkyparamour
Board Regular
 
Join Date: Feb 2002
Location: Florida
Posts: 82
Default

Mark,
You are right. I stand corrected........Now if I could just figure out the right answer I will feel a lot better.....;o)
kinkyparamour is offline   Reply With Quote
Old Mar 13th, 2002, 08:42 AM   #8
lenze
MrExcel MVP
 
lenze's Avatar
 
Join Date: Feb 2002
Location: Helena, MT
Posts: 13,690
Default

I think I'm confused as to what you have. As I understand it, you have imported a column with phone numbers of various lengths, such as 222222 and 5554446666 and 1555444666. Is that correct or do you have 222222 5554446666 1555444666 in one cell? If you do, Mark is correct, that is not a number format. If it's the first scenario, then use the custom format idea I previously posted. Replace the () with - if you wish.
lenze is offline   Reply With Quote
Old Mar 13th, 2002, 08:43 AM   #9
Guest
 
Posts: n/a
Default

Sorry for the confusion, they are three different numbers, showing if somebody enters a local number (2222222), area code and number(1232222222), or 1 area code and number(11232222222)
  Reply With Quote
Old Mar 13th, 2002, 08:48 AM   #10
Guest
 
Posts: n/a
Default

Lenze yours put -- in front of the local numbers and did not put - between the 1 and area code
  Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 03:19 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
All contents Copyright 1998-2012 by MrExcel Consulting.
diabetic desserts recipes recipes Diabetic Soups Holiday Pizza Recipes Popcorn Recipes Recipes For Microwave Pasta Recipes Casserole Recipes Chili Recipes Curry Recipes Crockpot Recipes Apples Recipes Bread Recipes Vegetarian Recipes Vegetable recipes Desserts Recipes Appetizers Ethnic Recipes Meat Dishes Barbecue Recipes Sauces Recipes Marinade Recipes Low Fat Recipes Frugal Gourmet Kitchen Classics Recipes On The Grill Cook Books Seafood Recipes Cajun Recipes Breads Low Fat Low Fat Breads Bread Machine Recipes Yeast Breads Quick Breads Fat Free Vegetarian Salad Recipes Eggplant Recipes Radish Recipes Tomato Recipes Jalapeno Recipes Potato Recipes Lettuce Recipes Cabbage Recipes Beans Ambrosia Recipes Biscotti Recipes Desserts Low Fat Cookie Recipes Cheesecake Recipes Cake Recipes Pie Recipes Muffin Recipes Custard Recipes Best Appetizers Appetizers Low Fat Salsa Recipes Dip Recipes International Recipes Afghan Recipes Alaska Recipes French Recipes German Recipes Greek Recipes Italian Recipes Spanish Recipes Thai Recipes Korean Recipes Chinese Recipes Mexican Recipes Indian Recipes Beef Recipes Pork Pork & Ham Pork Butts Pork Chop Recipes Pork Ribs Rulled Pork Poultry Recipes Stews Recipes Ground Beef Barbecue Grill Barbecue Smoker All Purpose Sauce BBQ Sauce Barbecue Sauce Carolina BBQ Sauce Pickle Recipes Marinades Smoking Low Fat Appetizers & Dips Low Fat Breakfast Low Fat Cakes Low Fat Cheesecakes Low Fat Cookies Low Fat Desserts Low Fat Fish & Seafood Low Fat Meats Low Fat Pasta Low Fat Pies Low Fat Salads Low Fat Sandwiches Low Fat Sauces & Condiments Low Fat Sides Low Fat Soups Low Fat Vegetarian Baker's Dozen Taste of Home Recipe Book Bon Appetit Cookbook Blacktie Cookbook Buster Cook Book Cookbook USA Cook Book Cook Book Sara's Cookbook Sara's Cookbook Appetizers and Dips Poultry recipes Diabetic recipes Holiday recipes Miscellaneous recipes 110 recipes 1986 Usenet cookbook 2900 recipes Cyberrealm recipes Great sysops of world Specialty recipes Ceideburg recipes Cheese recipes Chili recipes Fruits recipes Garlic recipes Great chefs of NY Londontowne recipes Raisins recipes Recipes for kids US Food Vegetarian recipes Bread recipes Drinks Meat Dishes Brisket recipes Caribou recipes Chicken recipes Filet mignons recipes Pork recipes Swordfish recipes Turkey recipes Pasta recipes Uncategorized recipes Ethnic recipes Canada recipes English recipes Ethiopia recipes Germany recipes Greece recipes Mexican recipes Philippines recipes Welsh recipes Microwave recipes Soups recipes Vegetable recipes Asparagus recipes Barley recipes Brown rice recipes Lentil recipes Mushrooms recipes Salads recipes Wild rice Desserts recipes Cakes recipes Chocolate recipes Cookies recipes Ice cream recipes