Spreadsheet: 732444d1620961992-count-the-data-of-a-group-with-multiple-conditions-sample-file
Sheet: Sheet1

DETAILS
 |  |  |  |  |  |  |  |  |  |  |  |  | Date : |  |  |  | OUTPUT FILE
Name | Desc | Status | Jan | Feb | Mar | Apr | May | Jun | Jul | Aug | Sep | Oct | Nov | Dec |  |  |  | GroupA | GroupB | GroupC | GroupD | GroupE
[NAME] | AB | Duty |  | 2023-02-01 00:00:00 |  |  | 2023-05-01 00:00:00 |  | 2023-07-09 00:00:00 |  | 2021-09-15 00:00:00 | 2021-10-21 00:00:00 |  | 2021-12-12 00:00:00 |  |  | Jan
Joy | AC | Duty | 2022-01-15 00:00:00 |  |  |  |  | 2021-06-02 00:00:00 |  | 2021-08-06 00:00:00 |  |  | 2021-11-12 00:00:00 |  |  |  | Feb
[NAME] | AB | Off |  | 2024-02-06 00:00:00 |  |  | 2022-05-03 00:00:00 |  | 2022-07-06 00:00:00 |  | 2024-09-19 00:00:00 | 2023-10-15 00:00:00 |  | 2023-12-21 00:00:00 |  |  | Mar
[NAME] | AE | Duty |  |  | 2023-03-03 00:00:00 | 2024-04-04 00:00:00 |  | 2022-06-18 00:00:00 |  |  |  |  | 2020-11-24 00:00:00 |  |  |  | Apr
Shan | AF | Duty | 2020-01-02 00:00:00 |  |  |  | 2023-05-15 00:00:00 |  |  | 2024-08-07 00:00:00 |  |  |  | 2023-12-14 00:00:00 |  |  | May
[NAME] | AK | Duty | 2022-01-18 00:00:00 |  | 2022-03-07 00:00:00 |  | 2022-05-24 00:00:00 |  |  | 2021-08-23 00:00:00 |  |  | 2023-11-15 00:00:00 |  |  |  | Jun
[NAME] | AG | Off |  | 2021-02-18 00:00:00 |  |  |  |  |  | 2020-08-04 00:00:00 |  |  |  |  |  |  | Jul
[NAME] | AF | Duty |  |  |  |  | 2023-05-16 00:00:00 |  |  | 2020-08-17 00:00:00 |  |  |  | 2023-12-16 00:00:00 |  |  | Aug
[NAME] | AB | Duty |  | 2022-02-03 00:00:00 |  |  | 2024-05-26 00:00:00 |  | 2021-07-21 00:00:00 |  | 2023-09-24 00:00:00 | 2024-10-23 00:00:00 |  | 2021-12-16 00:00:00 |  |  | Sep
[NAME] | AE | Off |  |  | 2022-03-03 00:00:00 | 2023-04-16 00:00:00 |  | 2023-06-02 00:00:00 |  |  |  |  | 2019-11-18 00:00:00 |  |  |  | Oct
Royden | AK | Duty | 2023-01-22 00:00:00 |  | 2022-03-07 00:00:00 |  | 2021-05-31 00:00:00 |  |  | 2020-08-17 00:00:00 |  |  | 2021-11-16 00:00:00 | 2023-12-02 00:00:00 |  |  | Nov
Sathya | AE | Duty |  |  | 2022-03-15 00:00:00 | 2023-04-21 00:00:00 |  | 2020-06-18 00:00:00 |  |  |  |  | 2024-11-12 00:00:00 |  |  |  | Dec
Dhaneesh | AD | Off |  | 2022-02-12 00:00:00 |  |  | 2021-05-14 00:00:00 | 2020-06-14 00:00:00 | 2024-07-16 00:00:00 |  |  |  | 2023-11-27 00:00:00 | 2020-12-06 00:00:00
Sridhar | AC | Duty | 2024-01-17 00:00:00 |  |  |  |  | 2019-06-06 00:00:00 |  | 2021-08-16 00:00:00 |  |  | 2023-11-19 00:00:00 |  |  |  | Result :
Mathew | AA | Duty | 2020-01-01 00:00:00 | 2023-02-07 00:00:00 |  |  |  |  |  |  |  |  |  |  |  |  | I am looking for the count the data if the date is valid against each row & column
[NAME] | AB | Off |  | 2021-02-02 00:00:00 |  |  | 2021-05-04 00:00:00 |  | 2021-07-27 00:00:00 |  | 2022-09-17 00:00:00 | 2021-10-02 00:00:00 |  | 2020-12-19 00:00:00 |  |  | 1st Condition  - Only count if the status = Duty
Samson | AG | Duty |  | 2021-02-05 00:00:00 |  |  |  |  |  | 2019-08-17 00:00:00 |  |  |  |  |  |  | 2nd Condition - only count the date If the Month & Columns = "Y" (please refer sheet2)
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 3rd Condition - Count the data only if the date is greater than or equal today.