HELP on COUNTIF

  • Thread starter Thread starter ForgetMeNot
  • Start date Start date
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.!!!
 
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
 
Back
Top