In Google Sheets, I have an employee work shift scheduling sheet named Shifts2
.
- Column A lists all employees.
- Row 1 is a list of dates in November.
- The remaining rows in columns B through AG contain shift codes.
On any given date, scheduled employees have a shift code entered in their row.
- Multiple employees work each shift
- Employees who share a shift also share the same code.
Sample Data: Shifts2
A | B | C | |
---|---|---|---|
1 | Names | 01/11/2023 | 02/11/2023 |
2 | Landon Jameson | DO | DO |
3 | Avery Rose | 17-01 | 17-01 |
4 | Makayla Grace | 22-06 | 22-06 |
5 | Kamryn Elizabeth | 09-17 | 09-17 |
6 | Jovanny Alexander | 17-01 | 17-01 |
7 | Lila Marie | DO | DO |
8 | Kamila Nicole | 09-17 | 09-17 |
9 | Jovany Michael | DO | 06-14 |
10 | Liliana Faith | 17-01 | 17-01 |
In the sheet Selections
, I want a formula that returns a list of employee names based on a specified date and shift code.
A2
contains the lookup dateC2
contains a shift codeC7
contains the formula.
How can I accomplish this? I also intend to reuse the formula in D7
using the same date but with a different shift (specified in D2
).
Sample Results: Selections
A | B | C | D | |
---|---|---|---|---|
1 | Select a Date | 1st Shift | 2nd Shift | |
2 | 01/11/2023 | 09-17 | 17-01 | |
3 | ||||
4 | ||||
5 | ||||
6 | Agents on 1st Shift | Agents on 2nd Shift | ||
7 | Kamryn Elizabeth | Avery Rose | ||
8 | Kamila Nicole | Jovanny Alexander | ||
9 | Liliana Faith |