HELP on COUNTIF

F

ForgetMeNot

In short:

I dont understand why
=COUNTIF(H:H,A8)
is working, BUT
=COUNTIF(H:H,<A8)
=COUNTIF(H:H,>A8)
=COUNTIF(H:H,=A8)
=COUNTIF(H:H,">A8")
etc., are not working.

==============================================
What I am trying to do (the LONG version):

I have column A with value 10, 20, 30, 40, 50, etc, until 100
Column H are some random number between 1 to 99
I wish to calculate how many numbers in column H is less than 10, how
many number is less than 20, etc

I understand that I can use
=COUNTIF(H:H,"<10")
=COUNTIF(H:H,"<20")
=COUNTIF(H:H,"<30"), and so on

However, I am hoping I can sort of automated it by setting the criteria
using the number in column A...

But
=COUNTIF(H:H,<A8)
=COUNTIF(H:H,"<A8")
are both not working.!!!
 
G

Guest

To be consistent with the working version =countif(h:h,"<10"), you would want
=countif(h:h,"<" & a8). Otherwise, Excel will first evaluate the expression
<a8 and come up with either TRUE or FALSE, which is not what you're trying to
find.
--Bruce
 

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