MacMost Q&A Forum • View All Forum QuestionsAsk a Question

How To Separate 2 Data Points From One Column Counting Digits?

Hi, I have the entire column B, of a document that has a combined phone number and name as such: 786-555-1212angiemore@fir.com I would like to be able to extract the Phone number to column C, and the portion of the email only to column D. All Phone numbers are 12 digits. Can you help with a script to resolve it?
Thank you in advance

the data was received from our administrator where the phone number and email were on the same line without spaces, when we imported it to the spreadsheet we were not able to separate them properly in two columns.
—–
Felix

Comments: 2 Responses to “How To Separate 2 Data Points From One Column Counting Digits?”

    1 year ago

    Any time you need to do a task like this, search the Numbers formulas for functions that could apply and read their descriptions. I like to do this inside of Numbers by starting a formula (blank cell, press =) and then looking in the right sidebar.

    In this case, you could narrow things down right at the start by looking at just the "Text" functions. There are several there that could help, and no single right answer, but the simplest is LEFT.

    So to get 786-555-1212 from 786-555-1212angiemore@fir.com you would use the formula (in cell B2):

    LEFT(B2,12)

    This would give you the first 12 characters, or "786-555-6208".

    Then to get the rest, one function you could use is MID.

    MID(B2,12,999)

    The last parameter in the MID function is how many characters to capture. But you can overshoot that to make sure you get all of the characters.

    Felix
    1 year ago

    YES, YES, YES, Perfect and simple solution. Thank you so much!

Comments Closed.