I posted a similar question here yesterday, but didn't realize that I should have included more info/conditions.
Basically I am starting with a spreadsheet of timesheet data. Each row is a single clock in & clock out duration for an employee. An employee may have just one row per day, or they may have several depending on if they took breaks or switched jobs. Each job is required to have "done" somewhere in column I for each day, but not every row is required to. For example, if someone clocked in & out for job code "warehouse" two different times in one day, only one of those line items is required to have "done" in the notes.
The columns are as follows:
| A | B | C | D | E | F | G | H | I |
|---|---|---|---|---|---|---|---|---|
| First Name | Last Name | Date | Day | Start Time | End Time | Hours | Job | Notes |
My goal is for the sheet to flag the rows only when every entry for the same job code on the same day for the same person is missing "done" in notes (this could be 1 row or 3-4 rows) and when the following conditions are also met:
1.) Column H "Job" contains the text "Shop" or "Warehouse" anywhere in the cell contents.2.) If there are multiple entries that match, but 1 row contains "done" in Column I, then it should not be included in the rule / it should not be highlighted.
Two or more rows are considered matching when the following are the same:1.) Column A First Name2.) Column B Last Name3.) Column C Date4.) Column H Job
To summarize, an employee's entry for a particular job on one date should have "done" on any 1 of the rows, whether that is 1 single row or 6 rows.
I started with this formula to find matching rows:=COUNTIF(ArrayFormula($A$2:$A$983&$B$2:$B$983&$C$2:$C$983&$H$2:$H$983),$A2&$B2&$C2&$H2)>1
And then this is the formula suggested to me in my previous question:=NOT(REGEXMATCH($I2, "(?i)done")) *REGEXMATCH(""& $H2, "(?i)warehouse") *COUNTIFS($A$2:$A,$A2, $B$2:$B, $B2, $C$2:$C,$C2,$H$2:$H,$H2)>1
This works to flag only rows that have matches, not necessarily to search all cells in Column I of matching rows to determine if the entire matching dataset meets the conditions, or if single rows with no matches also meet the conditions.
Please feel free to ask clarifying questions, as I feel like I'm having trouble explaining myself clearly. Thank you!