Alteryx Designer

Find answers, ask questions, and share expertise about Alteryx Designer.
Andy Uttley, Alteryx ACE, makes music with Alteryx | Math + Music
SOLVED

Phone Number format (000)000-0000

Highlighted
8 - Asteroid

Is there a formula that would format all different types of formatted phone numbers into (000)000-0000?

 

For example: A file may have the following formats:

1231231234

123-123-1234

123123-1234

123-1231234

 

 

Highlighted
8 - Asteroid

Hi,

Let me know if this works.

 

Output:

 

Bennel_Wilson_0-1590432648492.png

 

 

The main part is the formula tool with this formula:

 

Bennel_Wilson_1-1590432673089.png

 

 

Attached workflow for your reference.

 

Regards

Benn

 

P.S: In case this solves your query, kindly mark it as a solution.

Highlighted
Alteryx Certified Partner
Alteryx Certified Partner

@reginawhelan ,

 

Please try:

 

Regex_Replace([phone number],"\D*?(\d{3})\D*?(\d{3})\D*?(\d{4})",'($1)$2-$3')

 

 cheers,

 

 mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and reboot. Order shall return.
Highlighted
8 - Asteroid

Thank you.

Labels