Forum Discussion
Phone numbers and area codes
I am trying to figure out the coding/function info needed to add area codes to phone numbers where it isn't already included. For example, in the list below, what formula can I put in, that would add a set area code ONLY to the numbers that don't already include one. In the sample list below, one phone number already has an area code, while the rest do not. I want to make it so that all the numbers that do not have an area code listed can add the same area code to that number. Thank you for the help.
213-4529
860-202-1348
202-292-2039
403-1928
391-2930
394-2096
916-290-1832
1 Reply
- Jihad Al-JaradySteel Contributor
I do not which number already including the area code, but the idea will be to check how many digits there using if function then, if the number in the cell has the required digits means it contain the area code otherwise include it,
I supposed the digits without the area code is 7 , and the area code +11 , so you can change them to fit your situation
=IF(LEN(A1< 7),CONCATENATE("+11",A1),A1)