ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Charts and Charting in Excel (https://www.excelbanter.com/charts-charting-excel/)
-   -   count with and formula (https://www.excelbanter.com/charts-charting-excel/214842-count-formula.html)

Satyendra_Haldaur[_2_]

count with and formula
 
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?

Bernard Liengme

count with and formula
 
Using COUNTIF:
=COUNTIF(A1:A12,"30")-COUNTIF(A1:A12,"100")
With SUMPRODUCT
=SUMPRODUCT(--(A1:A1230),--(A1:A12<100))
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Satyendra_Haldaur" wrote in
message ...
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?




Shane Devenshire[_2_]

count with and formula
 
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:

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?



All times are GMT +1. The time now is 06:22 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com