-3

Please help, I've been trying to figure out how to sort cell phone numbers by carrier. For example, the cell contains 9132345434 and if the first three digits are 913, 932 or 917, it will say in another cell, "Globe". if it's 939, 949 or 919, it will say Smart. If it's 948, 945 or 946, it will say "TM". How do I do this? Thank you so much in advance.

1
  • 2
    Super User isn't a code writing service, but we can help you solve specific problems. To get you started, create a lookup list of codes and carriers. In the cell where you want the carrier name, use VLOOKUP to find the carrier in the list by comparing the left 3 characters of the phone number (using the LEFT function), to the codes in the list. Give it a try and if you run into specific problems, ask for clarification.
    – fixer1234
    Sep 6, 2015 at 3:43

1 Answer 1

0

Yes VLOOKUP is one option. I prefer MATCH function.

The syntax of the MATCH function is:

=MATCH(lookup value, table range, [match type])

Lookup value is the cell that has the unique identifier. Table range - range of cells you’re searching. Select the full column with those phone numbers. Give it a range name.

You may try the solution at this link:

http://computers.tutsplus.com/tutorials/how-to-extract-data-from-a-spreadsheet-using-vlookup-match-and-index--cms-20641

It's not my site and I am not affiliated with that site in anyway.

1
  • I agree that INDEX + MATCH are better than VLOOKUP. I suggested VLOOKUP because it's a little simpler, adequate for this case, and the OP appears to have little Excel familiarity. I was going for "baby steps" in learning Excel. You've posted some good information, but Super User is a Q&A site; answers are expected to be solutions to the question. Helpful hints are done in a comment (which requires a little more rep). If you want to post an answer, take it all the way to an actual solution.
    – fixer1234
    Sep 6, 2015 at 18:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .