Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default CONVERT TO (###) ###-####

How do you convert a phone number in this format xxx-xxx-xxxx to (###)
###-####? I've tried format, cells, custom, (###) ###-#### and "(###)
###-####" but neither worked. I can convert to ########## if needed. I
appreciate your help.

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 430
Default CONVERT TO (###) ###-####

I just did a format cells....special...phone number and it came out the way
you wanted when i entered data. Is your problem that you physically have the
dashes inbetween the numbers thus making them text?

You could make another column and copy this formula into it. (assuming your
phone numbers start in A1)

="("&LEFT(A1,3)&") "&RIGHT(A1,8)

"JSM123456" wrote:

How do you convert a phone number in this format xxx-xxx-xxxx to (###)
###-####? I've tried format, cells, custom, (###) ###-#### and "(###)
###-####" but neither worked. I can convert to ########## if needed. I
appreciate your help.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,339
Default CONVERT TO (###) ###-####

Try this:

format a column as Special==(Locale) US=Phone Number

and then put the following in column and copy down:

=VALUE(SUBSTITUTE(A1,"-",""))

A1=123-456-7890 etc

Copy/paste special=values when complete

"JSM123456" wrote:

How do you convert a phone number in this format xxx-xxx-xxxx to (###)
###-####? I've tried format, cells, custom, (###) ###-#### and "(###)
###-####" but neither worked. I can convert to ########## if needed. I
appreciate your help.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default CONVERT TO (###) ###-####

I have the dashes physically in between. Your formula is almost perfect, is
there a way to add the dash before the last four digits? Your help is
appreciated.

"tim m" wrote:

I just did a format cells....special...phone number and it came out the way
you wanted when i entered data. Is your problem that you physically have the
dashes inbetween the numbers thus making them text?

You could make another column and copy this formula into it. (assuming your
phone numbers start in A1)

="("&LEFT(A1,3)&") "&RIGHT(A1,8)

"JSM123456" wrote:

How do you convert a phone number in this format xxx-xxx-xxxx to (###)
###-####? I've tried format, cells, custom, (###) ###-#### and "(###)
###-####" but neither worked. I can convert to ########## if needed. I
appreciate your help.

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 430
Default CONVERT TO (###) ###-####

Hmph the dash should still be there if the dash is physically there, at least
it was on my test.

="("&LEFT(A1,3)&") "&RIGHT(A1,8)

It should work as follows:
It puts a ( to start
It takes the 3 left most characters in the cell
It puts a ) and a space
It takes the 8 right most characters in the cell (this should be ###-####
and thus already include the dash)


"JSM123456" wrote:

I have the dashes physically in between. Your formula is almost perfect, is
there a way to add the dash before the last four digits? Your help is
appreciated.

"tim m" wrote:

I just did a format cells....special...phone number and it came out the way
you wanted when i entered data. Is your problem that you physically have the
dashes inbetween the numbers thus making them text?

You could make another column and copy this formula into it. (assuming your
phone numbers start in A1)
="("&LEFT(A1,3)&") "&RIGHT(A1,8)


"JSM123456" wrote:

How do you convert a phone number in this format xxx-xxx-xxxx to (###)
###-####? I've tried format, cells, custom, (###) ###-#### and "(###)
###-####" but neither worked. I can convert to ########## if needed. I
appreciate your help.



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default CONVERT TO (###) ###-####

works like a champ. Thnaks for the help.

"tim m" wrote:

Hmph the dash should still be there if the dash is physically there, at least
it was on my test.

="("&LEFT(A1,3)&") "&RIGHT(A1,8)

It should work as follows:
It puts a ( to start
It takes the 3 left most characters in the cell
It puts a ) and a space
It takes the 8 right most characters in the cell (this should be ###-####
and thus already include the dash)


"JSM123456" wrote:

I have the dashes physically in between. Your formula is almost perfect, is
there a way to add the dash before the last four digits? Your help is
appreciated.

"tim m" wrote:

I just did a format cells....special...phone number and it came out the way
you wanted when i entered data. Is your problem that you physically have the
dashes inbetween the numbers thus making them text?

You could make another column and copy this formula into it. (assuming your
phone numbers start in A1)
="("&LEFT(A1,3)&") "&RIGHT(A1,8)


"JSM123456" wrote:

How do you convert a phone number in this format xxx-xxx-xxxx to (###)
###-####? I've tried format, cells, custom, (###) ###-#### and "(###)
###-####" but neither worked. I can convert to ########## if needed. I
appreciate your help.

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 252
Default CONVERT TO (###) ###-####

the problem is that numbers with dashes are considered text. No custom
number format will work unless you remove the dashes. You can do this by
using Find and Replace putting a dash in Find and nothing in replace. Then
click on replace all. Then the custom number format should apply.

"JSM123456" wrote:

How do you convert a phone number in this format xxx-xxx-xxxx to (###)
###-####? I've tried format, cells, custom, (###) ###-#### and "(###)
###-####" but neither worked. I can convert to ########## if needed. I
appreciate your help.

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
Convert displayed number to absolute value jmorris305 Excel Discussion (Misc queries) 3 February 28th 06 01:27 AM
Convert decimal degree (lattitude/longitude) into Degree, Tim Ashcom Excel Discussion (Misc queries) 5 August 17th 05 04:53 PM
CONVERT Function Disappered in Excel Gord Dibben Excel Discussion (Misc queries) 3 April 13th 05 07:59 PM
convert decimal number to time : convert 1,59 (minutes, dec) to m agenda9533 Excel Discussion (Misc queries) 8 January 20th 05 10:24 PM
Convert Numeric into Text Monty Excel Worksheet Functions 0 December 18th 04 09:25 PM


All times are GMT +1. The time now is 09:58 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"