concatenating and formatting area code and phone number columns

G

Guest

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 (###) ###-####?
 
?

.

Sherri said:
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)
 
?

.

Sherri said:
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,"###-####")
 
G

Guest

Thanks - it worked perfectly.

. said:
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)
 
B

Bob Phillips

Try this

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

--

HTH

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top