Skip to main content

Need phone number formula

  • July 4, 2023
  • 2 replies
  • 19 views

Forum|alt.badge.img+1

Hi, I need to have three fields that have parts of a phone number in each field. 

For example, if the phone number is (123)456-7890, I need three fields that return:

field1: 123

field2: 456

field3: 7890

Can anyone help me with a formula that would accomplish this? Thank you!

2 replies

Forum|alt.badge.img+21
  • Inspiring
  • 560 replies
  • July 5, 2023

 

Hi @madavilla ,

In Regex will look like this

REGEX_EXTRACT({phone number},"\\((\\d+)\\)") REGEX_EXTRACT({phone number},"(\\d{3})-") REGEX_EXTRACT({phone number},"-(\\d{4})")

 


ScottWorld
Forum|alt.badge.img+35
  • Genius
  • 9770 replies
  • July 5, 2023

@madavilla 

It would be very easy and you wouldn’t even need REGEX. Just something like these:

MID({Phone NumberField}, 2, 3)

MID({Phone NumberField}, 6, 3)

MID({Phone NumberField}, 10, 4)