PC Review


Reply
 
 
nkob
Guest
Posts: n/a
 
      15th Oct 2003
Can anybody help me with the following formula.
=COUNTIF(AND(C2:C1300,"<=500"),(C2:C1300),">=0")).

I get an error everytime I try to put it in.


tx.



 
Reply With Quote
 
 
 
 
Chip Pearson
Guest
Posts: n/a
 
      15th Oct 2003
You can use two COUNTIFs. E.g.,

=COUNTIF(C2:C1300,"<=500")-COUNTIF(C2:C1300,"<0")


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com (E-Mail Removed)



"nkob" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Can anybody help me with the following formula.
> =COUNTIF(AND(C2:C1300,"<=500"),(C2:C1300),">=0")).
>
> I get an error everytime I try to put it in.
>
>
> tx.
>
>
>



 
Reply With Quote
 
Dan E
Guest
Posts: n/a
 
      15th Oct 2003
nkob,

Use 2 countif's for this

=COUNTIF(C2:C1300,">=0") - COUNTIF(C2:C1300,">500")
gets the range 0<=C2:C1300<=500
Count the number greater than or equal to 0 and subtract
the number greater than 500.

Or use 1 sumproduct
=SUMPRODUCT((C2:C1300<>"")*(C2:C1300>=0)*(C2:C1300<=500))

Dan E

"nkob" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
> Can anybody help me with the following formula.
> =COUNTIF(AND(C2:C1300,"<=500"),(C2:C1300),">=0")).
>
> I get an error everytime I try to put it in.
>
>
> tx.
>
>
>



 
Reply With Quote
 
Alan Beban
Guest
Posts: n/a
 
      15th Oct 2003
=COUNTBETWEEN(C2:C1300,0,500) where COUNTBETWEEN is below:

Function COUNTBETWEEN(rng, valLow, valHigh, _
Optional inclLow As Boolean = True, _
Optional inclHigh As Boolean = True)
Select Case inclLow & inclHigh
Case "TrueTrue"
COUNTBETWEEN = Application.CountIf(rng, ">=" & valLow) _
- Application.CountIf(rng, ">" & valHigh)
Case "FalseFalse"
COUNTBETWEEN = Application.CountIf(rng, ">" & valLow) _
- Application.CountIf(rng, ">=" & valHigh)
Case "FalseTrue"
COUNTBETWEEN = Application.CountIf(rng, ">" & valLow) _
- Application.CountIf(rng, ">" & valHigh)
Case "TrueFalse"
COUNTBETWEEN = Application.CountIf(rng, ">=" & valLow) _
- Application.CountIf(rng, ">=" & valHigh)
End Select
End Function

Alan Beban

nkob wrote:
> Can anybody help me with the following formula.
> =COUNTIF(AND(C2:C1300,"<=500"),(C2:C1300),">=0")).
>
> I get an error everytime I try to put it in.
>
>
> tx.
>
>
>


 
Reply With Quote
 
nkob
Guest
Posts: n/a
 
      15th Oct 2003
can i do the same with a sum. i want to sum up the total if the two
criteria match.


"Dan E" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> nkob,
>
> Use 2 countif's for this
>
> =COUNTIF(C2:C1300,">=0") - COUNTIF(C2:C1300,">500")
> gets the range 0<=C2:C1300<=500
> Count the number greater than or equal to 0 and subtract
> the number greater than 500.
>
> Or use 1 sumproduct
> =SUMPRODUCT((C2:C1300<>"")*(C2:C1300>=0)*(C2:C1300<=500))
>
> Dan E
>
> "nkob" <(E-Mail Removed)> wrote in message

news:(E-Mail Removed)...
> > Can anybody help me with the following formula.
> > =COUNTIF(AND(C2:C1300,"<=500"),(C2:C1300),">=0")).
> >
> > I get an error everytime I try to put it in.
> >
> >
> > tx.
> >
> >
> >

>
>



 
Reply With Quote
 
Dan E
Guest
Posts: n/a
 
      15th Oct 2003
For SUMIF's
=SUMIF(C2:C1300,">=0") - SUMIF(C2:C1300,">500")

For SUMPRODUCT
=SUMPRODUCT((C2:C1300)*(C2:C1300>=0)*(C2:C1300<=500))

Dan E

"nkob" <(E-Mail Removed)> wrote in message news:#(E-Mail Removed)...
> can i do the same with a sum. i want to sum up the total if the two
> criteria match.
>
>
> "Dan E" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > nkob,
> >
> > Use 2 countif's for this
> >
> > =COUNTIF(C2:C1300,">=0") - COUNTIF(C2:C1300,">500")
> > gets the range 0<=C2:C1300<=500
> > Count the number greater than or equal to 0 and subtract
> > the number greater than 500.
> >
> > Or use 1 sumproduct
> > =SUMPRODUCT((C2:C1300<>"")*(C2:C1300>=0)*(C2:C1300<=500))
> >
> > Dan E
> >
> > "nkob" <(E-Mail Removed)> wrote in message

> news:(E-Mail Removed)...
> > > Can anybody help me with the following formula.
> > > =COUNTIF(AND(C2:C1300,"<=500"),(C2:C1300),">=0")).
> > >
> > > I get an error everytime I try to put it in.
> > >
> > >
> > > tx.
> > >
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
COUNTIF is Off by 1 GooseMA Microsoft Excel Misc 4 8th Dec 2009 05:04 PM
Can I use COUNTIF with OR? AA Arens Microsoft Excel Discussion 3 20th Nov 2006 04:11 PM
How do I use a countif function according to two other countif fu. =?Utf-8?B?S2lyc3R5?= Microsoft Excel Worksheet Functions 2 20th Feb 2006 11:44 AM
COUNTIF or not to COUNTIF on a range in another sheet =?Utf-8?B?RWxsaWU=?= Microsoft Excel Worksheet Functions 4 15th Sep 2005 10:06 PM
COUNTIF in one colum then COUNTIF in another...??? =?Utf-8?B?Sm9ubmllUA==?= Microsoft Excel Worksheet Functions 3 22nd Feb 2005 02:55 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:03 PM.