Group:  Microsoft Excel ยป microsoft.public.excel.charting
Thread: count with and formula

Geek News

count with and formula
Satyendra_Haldaur 12/29/2008 2:24:01 PM
Dear all;
I am trying to use countif with and like this.
COUNTIF(A1:A12,and(">30","<100"))
I did try it with diffrent condition and even replace and with or but it
just show me answer 0.
is there any other way to use countif with multiple conditions?
Re: count with and formula
"Bernard Liengme" <bliengme[ at ]stfx.TRUENORTH.ca> 12/29/2008 2:48:21 PM
Using COUNTIF:
=COUNTIF(A1:A12,">30")-COUNTIF(A1:A12,">100")
With SUMPRODUCT
=SUMPRODUCT(--(A1:A12>30),--(A1:A12<100))
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Satyendra_Haldaur" <SatyendraHaldaur[ at ]discussions.microsoft.com> wrote in
message news:AB26D1FB-6F95-4932-88B7-98BA8E0402FB[ at ]microsoft.com...
[Quoted Text]
> Dear all;
> I am trying to use countif with and like this.
> COUNTIF(A1:A12,and(">30","<100"))
> I did try it with diffrent condition and even replace and with or but it
> just show me answer 0.
> is there any other way to use countif with multiple conditions?


RE: count with and formula
Shane Devenshire 12/29/2008 9:05:03 PM
Hi,

If you are using 2007 then

=COUNTIFS(A1:A12,">30",A1:A12,"<100")

Its more flexible to use cell references:

=COUNTIFS(A1:A12,">"&C1,A1:A12,"<"&C2)

Where C1 contains 30 and C2 100.


--
If this helps, please click the Yes button

Cheers,
Shane Devenshire


"Satyendra_Haldaur" wrote:

[Quoted Text]
> Dear all;
> I am trying to use countif with and like this.
> COUNTIF(A1:A12,and(">30","<100"))
> I did try it with diffrent condition and even replace and with or but it
> just show me answer 0.
> is there any other way to use countif with multiple conditions?

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net