Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
sherri
 
Posts: n/a
Default concatenating and formatting area code and phone number columns

I concatenated two columns (area code, phone number) and formatted them so
area code looks like (###); however, the 7-digit phone number still appears
as ####### even though I used custom format ###-#### prior to to
concatenating the two columns. Is it possible to add a hyphen so the final
number looks like (###) ###-####?
  #2   Report Post  
.
 
Posts: n/a
Default

Sherri wrote:
I concatenated two columns (area code, phone number) and formatted them so
area code looks like (###); however, the 7-digit phone number still appears
as ####### even though I used custom format ###-#### prior to to
concatenating the two columns. Is it possible to add a hyphen so the final
number looks like (###) ###-####?


Assuming the area code is in A1 and the phone number is in B1, you can
try the following formula in C1: ="("&A1&") "&LEFT(B1,3)&"-"&RIGHT(B1,4)

  #3   Report Post  
.
 
Posts: n/a
Default

Sherri wrote:
I concatenated two columns (area code, phone number) and formatted them so
area code looks like (###); however, the 7-digit phone number still appears
as ####### even though I used custom format ###-#### prior to to
concatenating the two columns. Is it possible to add a hyphen so the final
number looks like (###) ###-####?


One easy way is something like:
=TEXT(A1,"(#) ")& TEXT(B1,"###-####")

  #4   Report Post  
sherri
 
Posts: n/a
Default

Thanks - it worked perfectly.

"." wrote:

Sherri wrote:
I concatenated two columns (area code, phone number) and formatted them so
area code looks like (###); however, the 7-digit phone number still appears
as ####### even though I used custom format ###-#### prior to to
concatenating the two columns. Is it possible to add a hyphen so the final
number looks like (###) ###-####?


Assuming the area code is in A1 and the phone number is in B1, you can
try the following formula in C1: ="("&A1&") "&LEFT(B1,3)&"-"&RIGHT(B1,4)


  #5   Report Post  
Bob Phillips
 
Posts: n/a
Default

Try this

=TEXT(A1,"(000) "&TEXT(B1,"000-0000"))

--

HTH

RP
(remove nothere from the email address if mailing direct)


"sherri" wrote in message
...
Thanks - it worked perfectly.

"." wrote:

Sherri wrote:
I concatenated two columns (area code, phone number) and formatted

them so
area code looks like (###); however, the 7-digit phone number still

appears
as ####### even though I used custom format ###-#### prior to to
concatenating the two columns. Is it possible to add a hyphen so the

final
number looks like (###) ###-####?


Assuming the area code is in A1 and the phone number is in B1, you can
try the following formula in C1: ="("&A1&") "&LEFT(B1,3)&"-"&RIGHT(B1,4)




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



All times are GMT +1. The time now is 09:50 PM.

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"