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

countif problem

Status
Not open for further replies.

Chris559

Instructor
Dec 29, 2002
30
GB
I want countif to search and identify between a range of numbers. eg =COUNTIF(A4:A49,">=70") will return the number to times it finds a numberical value 70 or over. but how do I get it to find the number of times it finds a value between 50 and 59.9?
 
=countif(A:A, ">=50") - countif(A:A, ">=59.9")

[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.
 
=COUNTIF(A4:A49,">=60")-COUNTIF(A4:A49,"<=69.9")
This is what I put in but it has returned a value of -26
 
Watch your signs!

What you want to say is,
Desired Formula said:
(number of items greater than X)
[tab]minus
(number of items greater than X+Y)

In the formula you posted, you have one > (Greater Than) and one < (Less Than).

[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.
 
No no no,,

like anotherhiggins says you need to put


=COUNTIF(A4:A49,">=60")-COUNTIF(A4:A49,">=69.9")


you have <= instead of the needed >= in your 2nd countif

A,
 
Heh, I beat ya by a hair, SITM.

[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.
 
Many thanks anotherhiggins & SITM for the help - next time I'll make sure I read things properly!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top