Country code in phone number

Can i change the number “0” to “+” for country code in phone number?
i appreciate any help

Solved Solved
0 6 232
1 ACCEPTED SOLUTION

Hi @alex_gibson011186

Never tried specifically this.

What about this:

CONCATENATE(
   SUBSTITUTE(LEFT([phone],1),“0”,"+"),
   MID([Phone],2,LEN([Phone])-1)
)

For reference:

EDIT: correction to expression
EDIT2: correction:
MID([Phone],2,LEN([Phone]-1)) ==> MID([Phone],2,LEN([Phone])-1)

View solution in original post

6 REPLIES 6

Aurelien
Google Developer Expert
Google Developer Expert

Hi @alex_gibson011186

You may want to use SUBSTITUTE():

Also, just in case, please have a look on this post:

Hi @Aurelien

The formula works, I’ve managed to change “0” to “+”, the problem is that everything with the number “0” changes, how do I change just the first number? Can you help me?

SUBSTITUTE([phone],“0”,"+")

what formula should i add?

Hi @alex_gibson011186

Never tried specifically this.

What about this:

CONCATENATE(
   SUBSTITUTE(LEFT([phone],1),“0”,"+"),
   MID([Phone],2,LEN([Phone])-1)
)

For reference:

EDIT: correction to expression
EDIT2: correction:
MID([Phone],2,LEN([Phone]-1)) ==> MID([Phone],2,LEN([Phone])-1)

This is a misplaced parenthesis.
I corrected the expression above.

@alex_gibson011186 If you had checked at the documentation referenced provided, you would have noticed it

sorry I didn’t see it, thank you very much, now I can breathe easy

Top Labels in this Space