ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Problem w countif (https://www.excelbanter.com/excel-discussion-misc-queries/99566-problem-w-countif.html)

ingeman

Problem w countif
 
why won't this formula work? =countif(j2:j20,"1",f2:f20<"40")

Mallycat

Problem w countif
 

Because you are not using the formula correctly. This function only has
2 arguments, the first is the range, and the second is the criteria

Hence this will count all the 1's in the range

=countif(j2:j20,"1")

Matt


--
Mallycat
------------------------------------------------------------------------
Mallycat's Profile: http://www.excelforum.com/member.php...o&userid=35514
View this thread: http://www.excelforum.com/showthread...hreadid=561912


Max

Problem w countif
 
"ingeman" wrote:
why won't this formula work? =countif(j2:j20,"1",f2:f20<"40")


Guessing that the formula above represents what you want to do ..
Assuming cols J and F actually contain real numbers
with the possibility of some empty cells within col F,
try instead:
=SUMPRODUCT((J2:J20=1)*(F2:F20<40)*(F2:F20<""))
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---


All times are GMT +1. The time now is 12:00 AM.

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