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

Excel formula - Countif

Status
Not open for further replies.

captainjd02

Technical User
Sep 8, 2003
3
US
Hello,

I am trying to use the countif function but its not cooperating. All I want to do is count the cells that fall between two numbers. The problem is I either get a zero or an error saying I have too many arguments for the formula. Here is what my formula looks like, can anyone help. Thank-you in advance

=COUNTIF(G5:G38,&quot;>=400,<=499&quot;)
 
try
=sum((G5:G38>=400) * (G5:G38<=499&quot;)) array entered (Use ctrl-shift-enter rather than enter when you finish inserting the formula.

or try

=count(G5:G38) - (countif(G5:G38,&quot;<400&quot;) + countif(G5:G38,&quot;>499&quot;)) as a normal formula
 
=COUNTIF(G5:G38,&quot;>=400)-COUNTIF(G5:G38,&quot;>499&quot;)

Regards
Ken.................

----------------------------------------------------------------------------
Attitude - A little thing that makes a BIG difference
----------------------------------------------------------------------------
 
=SumProduct(((G5:G38,&quot;>=400)+(G5:G38,&quot;<=499&quot;))*1)


Peace! [peace]

Mike

Never say Never!!!
Nothing is impossible!!!
 
captainjd02
Please can you provide feedback as to which formula you have used (purely for the completeness of the thread) and also please note that the standard way of saying thanks in TT is to award a star. This also helps those users that search the archives as it highlights threads where a useful / helpful bit of information has been provided. To award a star, simply click on the &quot;Mark this post as a helpful / expert post&quot; link at the bottom of the appropriate thread.
We all appreciate a &quot;Thanks&quot; message but the stars are useful also

Rgds, Geoff
[blue]Si hoc signum legere potes, operis boni in rebus Latinus alacribus et fructuosis potiri potes![/blue]
Want the [red]best[/red] answers to your questions ? faq222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top