Adding area codes only to phone numbers missing an area code

R

RC

I'm trying to clean up some data that contains phone numbers that were
exported out of a employee database and imported into an Excel file. Each
employee's data makes up one row of data in the Excel file, and the phone
numbers of all employees are in cells in one column. The phone numbers for
some employees have the area code while the area code is missing in the phone
numbers for the other employees. Is there some method, other than manually
editing each cell containing a phone number that's missing the area code,
that I can use to add the area code to only those employee phone numbers that
are missing the area code?
 
J

Jim Thomlinson

Is your data text or numbers??? If it is text exactly what does it look like???
 
G

Gord Dibben

Assuming area code is the same for each employee.

=IF(LEN(A1)=8,"229-"&A1,A1)


Gord Dibben MS Excel MVP
 

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