Question

Locked

Count from an Excel range

By kashzamir ·
Hi,
I have basic Excel knowledge and been trying to figure out how to count instances of values based on a defined range.
Example:
Column A
1
11
21
Column B
10
20
30
Count (Column C)
?
?
?

Scores
2
4
20
35
I want excel to look at the "scores" and update the Count column (C) by adding each instance within the range. i.e.for above example count in row one should be 2 because scores 2 and 4 are within the range of column A and B.
Likewise count should be 1 for row 2 and 3.

Please advise.

Kashif

This conversation is currently closed to new comments.

2 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Collapse -

Try this

by Bizzo In reply to Count from an Excel range

For cell C1 and copy for the rest of column C:
=COUNTIF(Score, ">="&A1)-COUNTIF(Score,">"&B1)

You may need to change the comparison operators, depending if you need to exclude or include the numbers in the range. So as it is now, it will count the scores in the range from 1 to 10 inclusive, etc.

Also, "Score" is the range, you have your scores in. :-)

Edit:
It also assumes that the number in column A is less than the one in column B. If you can't guarantee that, then use this:

=ABS(COUNTIF(Score, ">="&A1)-COUNTIF(Score,">"&B1))

Back to Software Forum
2 total posts (Page 1 of 1)  

Related Discussions

Related Forums