Please Assist With Formula That Looks at First Number

meppwc

Well-known Member
Joined
May 16, 2003
Messages
626
Office Version
  1. 365
Platform
  1. Windows
My column C represents a list of phone numbers that are all 5 digits long.
The list represents internal phone numbers of our company
For example - 43140 would be how you could call within the company where as 4 is the last number of the NXX and 3140 would represent the line.

What I want to do in column D is create a list of the full phone numbers for column C (NPA-NXX-LINE).
For example
If cell C2 is 43140, then D2 would be 314-694-3140

Column C also has numbers that start with 7 (72263 for example)
If cell C3 is 72263, then D3 would be 636-737-2263

The 5-digit TNs in column C always start with 4 or 7 and the needed result will always start with either 314-694 or 636-737
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
How about
=IF(LEFT(C4,1)="4","314-694-"&RIGHT(C4,4),"636-737-"&RIGHT(C4,4))
 
Upvote 0
wow that worked perfectly............thanks so much
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top