I've a column of numbers (B4 to B56)...
What I want to do is to check each Cell and IF it is LESS than 20, add up the
number of CELLS (not the cell value) that are less than 20... and vis-versa.
Not all cells have any number in them initially. This is a table which gets
added to each week.
Example:
B4 2
B5 17
B6 24
B7 28
B8 17
B9 40
B10 22
B11 24
What I want is Two cells that show:
Number Less than 20: 3
Number More that 20: 5
Any thoughts appreciated...
BruceF
> I've a column of numbers (B4 to B56)...
>
[quoted text clipped - 25 lines]
>
> BruceF
=COUNTIF(B4:B11,"<20")
=COUNTIF(B4:B11,">20")
Rusty
Mr. B - 06 Aug 2007 16:39 GMT
>> What I want is Two cells that show:
>> Number Less than 20: 3
>> Number More that 20: 5
>=COUNTIF(B4:B11,"<20")
>=COUNTIF(B4:B11,">20")
Argh... I was messing with the IF statement. Thanks!
BruceF
You haven't taken into account numbers that =20.
You want the count of numbers less than 20 and a count of numbers greater
than 20. What about 20?
Less than 20:
=COUNTIF(B4:B100,"<20")
=COUNTIF(B4:B100,"<"&A1) where A1 = 20
Less than or equal to 20:
=COUNTIF(B4:B100,"<=20")
=COUNTIF(B4:B100,"<="&A1)
Greater than 20:
=COUNTIF(B4:B100,">20")
=COUNTIF(B4:B100,">"&A1)
Greater than or equal to 20:
=COUNTIF(B4:B100,">=20")
=COUNTIF(B4:B100,">="&A1)

Signature
Biff
Microsoft Excel MVP
> I've a column of numbers (B4 to B56)...
>
[quoted text clipped - 25 lines]
>
> BruceF
Mr. B - 06 Aug 2007 16:39 GMT
>You haven't taken into account numbers that =20.
>You want the count of numbers less than 20 and a count of numbers greater
>than 20. What about 20?
Right... I would have (:
I just didn't want to get too complicated on what I wanted... just a push in
the right direction.
Thanks!
BruceF
T. Valko - 06 Aug 2007 19:11 GMT
You're welcome. Thanks for the feedback!

Signature
Biff
Microsoft Excel MVP
>>You haven't taken into account numbers that =20.
>>You want the count of numbers less than 20 and a count of numbers greater
[quoted text clipped - 9 lines]
>
> BruceF