![]() |
HELP on COUNTIF
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.!!! -- ForgetMeNot ------------------------------------------------------------------------ ForgetMeNot's Profile: http://www.excelforum.com/member.php...o&userid=28583 View this thread: http://www.excelforum.com/showthread...hreadid=482485 |
HELP on COUNTIF
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 "ForgetMeNot" wrote: 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.!!! -- ForgetMeNot ------------------------------------------------------------------------ ForgetMeNot's Profile: http://www.excelforum.com/member.php...o&userid=28583 View this thread: http://www.excelforum.com/showthread...hreadid=482485 |
All times are GMT +1. The time now is 06:59 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com