Formatting Phone numbers

Hello I’m currently looking for a way to format phone numbers basically all I wanna do is remove the possible country code due to a problem with a software that was automatically adding the incorrect country code so for some of the phone numbers they look like +521234567891 or (949) 123-4567 and even some are +12345678910 and I just want the all to look like 9491234567. Would really appreciate any suggestions with this :blush:

Hey @Luke_Jamison :wave:

We can format these numbers as 9491234567 by starting with a Clean Data step, removing all non-numbers to eliminate spaces, plus signs, and parentheses.

We can then use the Extract Text From Column step to identify the final 10 digits of the unformatted number, which should extract the number without the country code or preceding 1.

Hope this helps – let me know if you run into any issues, or have any additional questions!

1 Like

@Adam_R Thank you so much for the help on this really appreciate it looks like I got it all up and working!

1 Like

Thanks for the very concise instructions here @Adam_R
This may be a newbie question, but to take it one step further, if I’ve reduced all phone numbers to valid 10-digit numbers, is there a simple way to add back the area code, which is in almost all cases in my data, +61 …

Just found the answer “hiding in plain sight” Add Text Column !! :wink: