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
May 05, 2024Copper Contributor
Dear OliverScheurich
I have a new approach that there are two types of attendance A and P
If I wanna list all days for both types and add a new column refer to the absent type like in the attached file AN21:AN28
and modify the old formula in cell AK21 to accept both A AND P
I wonder if you will help me this time ,,,, so embarrassed of your kindness 🙂
OliverScheurich
May 06, 2024Gold Contributor
Hello, attached is my suggestion for this scenario. Kind regards.