You need to sign in to do that
Don't have an account?
Formula field to automatically add International number format
I'm trying to build a formula to accomplish the following:
- Reformat a phone number field to display the full US calling format instead of the local calling format.
- Example: In the UK numbers have one of three prefixes, 01, 02, or 03. When my leads post from web to lead, they are formatted as if I were located in the UK and calling these leads. I am located in the US where I am required to dial 011 44 and then the number.
Here is my code:
if(contains (Phone, "01"), substitute(Phone,"01", "011 44 1"),
if (contains (Phone, "02"), substitute(Phone, "02", "011 44 2"),
if (contains (Phone, "03"), substitute(Phone, "03", "011 44 3"),
""
)))
The formula works well, except for cases where there exists a "01", "02", or "03" somewhere other that the begining of the number, which it will then replace with the designated text.
How do I get my formula to only replace the value of the phone number in cases which it begins with an "01", "02", or "03" without searching the entire field.
Thanks in advance.
Steve
Try changing your statement from "Contains" to "Begins" and see if that works.
All Answers
Try changing your statement from "Contains" to "Begins" and see if that works.