Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel - Count between an upper and lower limit

Status
Not open for further replies.

ftpdoo

Programmer
Aug 9, 2001
202
GB
Good Afternoon :O) I have an Excel spreadsheet with the following ranges:

Percentage Figure 55% 85% 33% 80% 55%

Scoring Key: Total Percent of sample
75% - 100% = Good 2
50% - 74% = Acceptable 2
0% - 50% = Poor 1
I need to work out how many are betwen 50% and 74%. (ie the 2 figure above)

Its easy for one criteria: =COUNTIF(B41:U41, ">70%")

But does anyone know how to do this between <=50 and >=74??

I'm beat...

Thanks,
Jonathan
 
=COUNTIF(A:A,">=50%")-COUNTIF(A:A,"<750%")

If your values are in column A,

Place your cutoffs in, say, column B

Example:
[tt]
A B C
data1 50% =COUNTIF(A:A,"<"&B1)
data2 75% =COUNTIF(A:A,">"&B1)-COUNTIF(A:A,">"&B2)
data3 100% =COUNTIF(A:A,">"&B2)-COUNTIF(A:A,">"&B3)
...
...
[/tt]

[tt]_____
[blue]-John[/blue][/tt]
[tab][red]The plural of anecdote is not data[/red]

Help us help you. Please read FAQ181-2886 before posting.
 
The other approach is to simply count the number of entries below the upper bound of the range and deduct the counts of the earlier ranges. i.e. if the counts are in C45 and below C46 would be something like
Code:
=COUNTIF(B41:U41, "<75%")-Sum(C47:C$48)

depending on the number of ranges (assuming 2 here for 0-25% and then 25%-50%)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top