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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need Excel syntax for BETWEEN 2

Status
Not open for further replies.

mhoyt

Technical User
Apr 11, 2005
49
US
I have a range called SCORES, with numeric values 0 to 100.

I want to see how many scores are between (inclusive) let's say 70 and 79. And basically every other range of possibilities in 10 point increments. So I thought I'd use column D for the minimum point of any given range, and column E for the maximum. So D10 = 70 and E10 = 79.

Then I wanted a formula in F10 like COUNTIF (D10<=SCORES<=F10),
but this does not work. I know I could kludge something like count all scores greater than the minimum and then subtract the values of all higher rows, but a nice BETWEEN syntax would make me happier. Any ideas?

TIA Mike
 

Hi,
[tt]
sumproduct((SCORES<=F10)*(SCORES>=D10))
[/tt]


Skip,
[sub]
[glasses] [red][/red]
[tongue][/sub]
 
Bingo! Thanks very much Skip!
 
Or
[tab][COLOR=blue white]=COUNTIF(Scores,"<"&$E$10)-COUNTIF(Scores,"<"&$D$10)
[/color]

[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.
 
Hey, another neat idea! Thanks.

I see you are concatanating the < sign to make it work, I wasn't haven't ay luck without the concatanation, so thats another good tip.

Skip, why does yours work? What does the sumproduct function do?
 
Holy cow! That is a great link John! I love days where I learn new skills, this is a banner day!
 
Happy to help!
[cheers]
Have a great weekend!

[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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top