Jun 21, 2022 04:07 PM
I have Australian mobiles that I need to convert to the following format:
61412826666 (note no spaces and also no plus signals)
Here are the examples of mobiles I have:
0439 584 111
+61 448 196 088
4197 118 98
Is there a formula that can convert all of these to the 614… format I specified above?
Thank you!
Jun 21, 2022 04:44 PM
Hi,
the easy way, first came on mind - to use something like
SUBSTITUTE(
SUBSTITUTE({Field},"+",""),
" ","")
if that is not enough, you can read this topic. the example is about phone numbers.
Jun 21, 2022 06:14 PM
Thank you - that looks like it will help with removing pluses and spaces but what about removing the leading 0’s and converting to 61 instead if that makes sense
(Australian mobiles all start with 0 in Australia… but when calling overseas you just dial 614153… whereas in Australia you dieal 04153…) - hope that makes sense. Thanks!
Jun 21, 2022 07:34 PM
Here’s a formula that should do the trick:
IF(Phone, REGEX_REPLACE("61" & REGEX_REPLACE(REGEX_REPLACE(Phone, "\\D", ""), "^0", ""), "^61614", "614"))
Jun 22, 2022 07:38 AM
Nice job with the REGEX formula, @Justin_Barrett!
I’m posting this primarily for my own future reference, but Make.com has a built-in Phone Number parsing tool, which can parse a phone number in a variety of different ways (see screenshot #2 below), based on the country that you specify.
However, it always leaves the plus symbol intact, so you have to remove the plus symbol using the replace function (see screenshot #3 below).
Screenshot #1:
Screenshot #2:
Screenshot #3:
I tried this in Make.com using all of the sample phone numbers that @Kosta_Kondratenko listed, and it worked perfectly! :grinning_face_with_big_eyes: