function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
iSqFt_ADiSqFt_AD 

Trying to create a formula field that pulls Area Code from Phone

I want to create a formula field that will pull out the area code from an Accounts phone number. For some reason I am hitting a road block on this.


Thanks in advance.

Steve :-/Steve :-/

If your phone data is clean (like it's ALWAYS in NNN-NNN-NNNN format  you and just want to grab the first 3 characters using a 

LEFT(Phone,3)

 The tough part is gonna be parsing out special characters like "(", ")", " - ", ".", etc...  

iSqFt_ADiSqFt_AD

Which we have. We actually have validation rules put in place to require all phone numbers to be in a (###) ###-#### format. Is there a way to ignore the first ( and pull just the next three characters?

Steve :-/Steve :-/

For that you'd need to use either a FIND or a MID (or both) I'm kinda rusty on extracting Text strings