How can I automatically add an area code to a number in a cell
The formula works nicely for instering "1-585" into the cells.
My problem is (and I didn't explain it well enough the first time) that I
have existing data in the cells. For example: telephone numbers exist in
cells AE2....AE2500. They already have phone numbers in them like 555-1212
and (716) 555-1212. I want to systematically change 555-1212 to
1-585-555-1212 and (716) 555-1212 to 1-716-555-1212.
I am an intermediate user of Excel and can mess with formulas a bit, but it
seems that whatever formula I use, I will still have to re-enter the data
into each cell (all 2500 of them). That's what I'm trying to avoid if I can.
Thanks for your help.
"Miguel Zapico" wrote:
Provided that you only have those two formats, you may try a formula like this:
=IF(LEN(A1)10,"1-" & MID(A1,2,3) & "-" & RIGHT(A1,8),"1-XXX-" & A1)
If the 1-XXX is not the same in all cases, you may need to edit the formula
to point a reference instead of the hard-coded number.
Hope this helps,
Miguel.
"Disaster Lady" wrote:
I want to change telephone numbers from format (XXX) XXX-XXXX to
1-XXX-XXX-XXXX. I also want to add 1-XXX to XXX-XXXX in cells.
|