Hi everyone,
I have phone numbers entered as 49123456789, where "49" is the country code
I'd like to change the format to +49 123456789
I tried this
if StartWith[Phone], "49"
then replace[phone], "49", "+49 "
this formula changes also any '49' string within the phone number, which is not what I aim to.
how can I say that I want to change only the first occurrence?
thank you
ms
Solved! Go to Solution.
If left([Field],2) = '49' Then '+49 ' + right([field],length([field])-2) Else [field] endif
Something a bit more dynamic would be quite simple...
'+'+left([field],2)+' '+right([field],length([field])-2)
Though you may want to build out some logic to check if the phone number does indeed start with a country code.
Ben
thank you BenMoss!
Yes, I'll keep the IF, since I have phone numbers without country code