countif criteria sg

  • Thread starter Thread starter Fred Loh
  • Start date Start date
F

Fred Loh

i have a column (column B) of cells with numbers in the cells. i want to
count for. example, how many cells have a number between 12 and 29. i used
=countif(B:B,">=12 and <=29") but it did not work. =countif(B:B,">=12,<=29")
also did not work. what is the correct syntax for the criteria in the
formula?

thanks for your help
fred
 
thanks guys!

Gary's Student's solution works and the logic makes sense.

Teethless mama's solution also works but I don't understand why the need to
multiply {1,-1}

i can't get Don's solution to work. i have a "#NUM!" error.
 
It works! Thanks Don.

Don Guillett said:
Sumproduct does not take full columns. Must use a range as I did a2:a???

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(e-mail address removed)
 

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