Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Remove Parentheses 1

Status
Not open for further replies.

Petzl

Technical User
Jul 10, 2002
114
AU
Is there a way to remove parentheses via a formula? Problem is that I have phone numbers in the following format:
+61 02 (8818 9999)
+61 02 (99) 033333

I need to remove the +61 and parentheses basically! How can I get a formula to end up with 02 9999 9999?

Cheers
 
If you have CR 8.5 or 9 then you can use Nested Replace functions:

Replace(Replace(Replace({@phone},"+61 ",""),"(",""),")","")

In this example, I've simply replaced the offending string values with empty strings.

This formula is available in CR8, but I've seen a post recently where the empty string causes undesirable results. Be sure to check this out if you have CR 8.

Also, assuming that all of your records don't actually start with "+61", you may want to combine a Right function (to strip the country codes) with the nested Replace functions (to strip the parentheses):

Replace(Replace(Right({@phone},14),"(",""),")","")
 
Superb Rhinok!

Thanks very much .....I have learnt something new and very handy :D
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top