I'm attempting to count how many times a certain number occurs when certain criterias are met.
Essentially I have a workbook which records employees' (who are assigned in specific group) attendance/hours worked/etc. The workbook also attempts to calculate total hours worked with the following criterias: normal working day, rest days, and holidays.
So in order to achieve this I have two tables.
On one worksheet, I have a table of all employees names, groups and the dates for the year. The values inside are the number of hours worked. They are manually entered.
On another worksheet, is the schedule of holidays and rest days for the year. The constants.
So, what I'm trying to do, for instance, is count all the "4" hours worked where that day is a rest day into a single cell. Is this possible?
So for Jay, he's count would be 1
For Bob, he's count would be 0
For Dan, he's count would be 1
I've tried using a mix of countif(), countifs(), lookup(), if(), and(). But unable to achieve what I want.
Essentially I have a workbook which records employees' (who are assigned in specific group) attendance/hours worked/etc. The workbook also attempts to calculate total hours worked with the following criterias: normal working day, rest days, and holidays.
So in order to achieve this I have two tables.
On one worksheet, I have a table of all employees names, groups and the dates for the year. The values inside are the number of hours worked. They are manually entered.
On another worksheet, is the schedule of holidays and rest days for the year. The constants.
So, what I'm trying to do, for instance, is count all the "4" hours worked where that day is a rest day into a single cell. Is this possible?
So for Jay, he's count would be 1
For Bob, he's count would be 0
For Dan, he's count would be 1
I've tried using a mix of countif(), countifs(), lookup(), if(), and(). But unable to achieve what I want.