How Do I calculate this?

  • Thread starter Thread starter Mr. B
  • Start date Start date
M

Mr. B

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
 
Mr. B said:
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


=COUNTIF(B4:B11,"<20")
=COUNTIF(B4:B11,">20")

Rusty
 
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)
 
T. Valko said:
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
 
Back
Top