Countif ...

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a column with phone numbers. I want to count how many phone numbers
have the area code "214" and "972".
 
Thanks, the first formula worked.

Jason Morin said:
The formula depends on how your phone numbers are formatted and whether they
are text or actual 10 digit numbers. For example, if they are text and you
simply need the first 3 numbers in the cell, try:

=SUMPRODUCT(--(LEFT(A1:A10,3)={"214","972"}))

If the area codes are enclosed in parentheses, you could use:

=SUM(COUNTIF(A1:A10,{"*(214)*","*(972)*"}))

Posting some examples will help readers give you a formula that works.

HTH
Jason
Atlanta, GA
 
The formula depends on how your phone numbers are formatted and whether they
are text or actual 10 digit numbers. For example, if they are text and you
simply need the first 3 numbers in the cell, try:

=SUMPRODUCT(--(LEFT(A1:A10,3)={"214","972"}))

If the area codes are enclosed in parentheses, you could use:

=SUM(COUNTIF(A1:A10,{"*(214)*","*(972)*"}))

Posting some examples will help readers give you a formula that works.

HTH
Jason
Atlanta, GA
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top