Forum Discussion
Eyad_Kurdi
Apr 17, 2024Copper Contributor
Count a value in a range which depends on start and end date
Hi Everyone, I need to count how many absent days for each class in a period can be determinded by user. User can choose start date in Cell (AM1) and end date in Cell (AO1). Then in range AO7:AO11...
- Apr 17, 2024
=SUMPRODUCT(($E$1:$AI$1>=$AM$1)*($E$1:$AI$1<=$AO$1)*($E$2:$AI$7="A")*($D$2:$D$7=AN7))
SUMPRODUCT returns the expected result in my sheet.
Eyad_Kurdi
Apr 17, 2024Copper Contributor
I could count for one day and 1 row (E3:AI3) only but not for a period... =COUNTIFS(INDEX($E$3:$AI$18;;XMATCH($AM$1;$E$1:$AI$1;0);1);"A";$D$3:$D$18;$AN7)