ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Formula want work (https://www.excelbanter.com/excel-programming/423428-formula-want-work.html)

drose

Formula want work
 
can you tell me why this wont work? I am trying to find how many days in
column H2:H232 are less than 8 if in column D2:D232 the month is January. I
used the formula below as an array formula but it is just counting all of the
days and not the one's less than 8.

{=COUNT(IF(D2:D232="January",H2:H232,"<8"))}

Mike H

Formula want work
 
Maybe

=SUMPRODUCT((D2:D25="January")*(H2:H25<8))

Mike

"drose" wrote:

can you tell me why this wont work? I am trying to find how many days in
column H2:H232 are less than 8 if in column D2:D232 the month is January. I
used the formula below as an array formula but it is just counting all of the
days and not the one's less than 8.

{=COUNT(IF(D2:D232="January",H2:H232,"<8"))}


Max

Formula want work
 
This would likely cover it better he
=SUMPRODUCT((TEXT(D2:D25,"mmmm")="January")*(D2:D2 5<"")*(H2:H25<8)*(H2:H25<""))

Your data vis-a-viz count criteria issues could be:
1. You have real dates in col D, not text: January
2. There are blank cells in either/both cols D & H
Any blank cells will be evaluated as a real date in "January" (affects col
D's checks) or as a zero in calcs (affects col H's checks)
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:22,500 Files:370 Subscribers:66
xdemechanik
---
"drose" wrote:
can you tell me why this wont work? I am trying to find how many days in
column H2:H232 are less than 8 if in column D2:D232 the month is January. I
used the formula below as an array formula but it is just counting all of the
days and not the one's less than 8.

{=COUNT(IF(D2:D232="January",H2:H232,"<8"))}



All times are GMT +1. The time now is 05:50 AM.

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