Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
COUNTIF
I have following VBA code
=COUNTIF(L12:L30,(AND("= 50","<60"))) I wanted to count if the value is greater and equals 50 and less than 60 in range L12:L30, but it does not work. It works if I use only one criteria like following. =COUNTIF(L12:L30,"= 50") Does COUNTIF suport more than one criteria? Any information is great appreciated, |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
COUNTIF
Try
=COUNTIF(L12:L30,"=50") - COUNTIF(L12:L30,"=60") Regards Rowan "Souris" wrote: I have following VBA code =COUNTIF(L12:L30,(AND("= 50","<60"))) I wanted to count if the value is greater and equals 50 and less than 60 in range L12:L30, but it does not work. It works if I use only one criteria like following. =COUNTIF(L12:L30,"= 50") Does COUNTIF suport more than one criteria? Any information is great appreciated, |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
COUNTIF
Thanks millions,
"Rowan" wrote: Try =COUNTIF(L12:L30,"=50") - COUNTIF(L12:L30,"=60") Regards Rowan "Souris" wrote: I have following VBA code =COUNTIF(L12:L30,(AND("= 50","<60"))) I wanted to count if the value is greater and equals 50 and less than 60 in range L12:L30, but it does not work. It works if I use only one criteria like following. =COUNTIF(L12:L30,"= 50") Does COUNTIF suport more than one criteria? Any information is great appreciated, |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
COUNTIF
You're welcome.
"Souris" wrote: Thanks millions, "Rowan" wrote: Try =COUNTIF(L12:L30,"=50") - COUNTIF(L12:L30,"=60") Regards Rowan "Souris" wrote: I have following VBA code =COUNTIF(L12:L30,(AND("= 50","<60"))) I wanted to count if the value is greater and equals 50 and less than 60 in range L12:L30, but it does not work. It works if I use only one criteria like following. =COUNTIF(L12:L30,"= 50") Does COUNTIF suport more than one criteria? Any information is great appreciated, |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
COUNTIF
=SUMPRODUCT(--(L12:L30=50),--(L12:L30<60))
-- HTH RP (remove nothere from the email address if mailing direct) "Souris" wrote in message ... I have following VBA code =COUNTIF(L12:L30,(AND("= 50","<60"))) I wanted to count if the value is greater and equals 50 and less than 60 in range L12:L30, but it does not work. It works if I use only one criteria like following. =COUNTIF(L12:L30,"= 50") Does COUNTIF suport more than one criteria? Any information is great appreciated, |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
COUNTIF or COUNTIF | Excel Worksheet Functions | |||
How do I use a countif function according to two other countif fu. | Excel Worksheet Functions | |||
edit this =COUNTIF(A1:F16,"*1-2*")+COUNTIF(A1:F16,"*2-1*") | Excel Discussion (Misc queries) | |||
COUNTIF or not to COUNTIF on a range in another sheet | Excel Worksheet Functions | |||
COUNTIF in one colum then COUNTIF in another...??? | Excel Worksheet Functions |