Countif Criteria Reference Cell

S

StephonM

How can I use Countif to allow me to reference a cell that contains the area
codes of phone numbers to be counted? Below is my feble attempt:

=COUNTIF(Contacts!H3:H229,C4&"*")

where, C4 is the cell that contains the area codes to be searched. The "*"
must be employed, as the area code is only the beginning 3 digits of the 10
digit numbers in the given range.
 
T

T. Valko

What format are the phone numbers in?

(123) 123-1234
123-123-1234
123 - 123 - 1234
1231231234

Do any of the area codes start with leading 0s?
 
L

Lars-Åke Aspelin

How can I use Countif to allow me to reference a cell that contains the area
codes of phone numbers to be counted? Below is my feble attempt:

=COUNTIF(Contacts!H3:H229,C4&"*")

where, C4 is the cell that contains the area codes to be searched. The "*"
must be employed, as the area code is only the beginning 3 digits of the 10
digit numbers in the given range.

If the area code is always the three leftmost digits you may try
something like this:

=SUMPRODUCT(- -(LEFT(Contacts!H3:H229,3)=""&C4))

Hope this helps / Lars-Åke
 
S

StephonM

They are in the following format:

212 555 8888

T. Valko said:
What format are the phone numbers in?

(123) 123-1234
123-123-1234
123 - 123 - 1234
1231231234

Do any of the area codes start with leading 0s?
 

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

Top