For convenience,Let's assume we have a shift schedule of a week.Header has the days from Monday to Sunday, and the 1st column contains the names of the employees.
| Names | Monday | Tuesday | Wednesday | Thursday | Friday | Suturday | Sunday |
|---|---|---|---|---|---|---|---|
| Andreas | 17-01 | DO | 22-06 | DO | 17-01 | 22-06 | 22-06 |
| Bob | 22-06 | 22-06 | 17-01 | DO | 22-06 | 09-17 | 09-17 |
| Celia | 09-17 | DO | 22-06 | 22-06 | DO | 17-01 | 17-01 |
| Daniela | 17-01 | 22-06 | 17-01 | DO | 22-06 | DO | 22-06 |
| Elena | 22-06 | DO | 09-17 | 09-17 | 09-17 | 22-06 | 09-17 |
| Franc | 09-17 | 09-17 | DO | 22-06 | DO | 09-17 | 22-06 |
I also have a in a cell a drop-down list with the names of all employees and once I select a name I want the following:
I want it to show me the days of the week where the agent I chose has the shift code "22-06" and below of each that day I would also want to show me the rest agents who will have the same shift.
For example if I choose agent "Andreas" then the result to be the following:
| Wednesday | Suturday | Sunday |
|---|---|---|
| Celia | Elena | Daniela |
| Franc |
I was trying to do that with query function but the selection of the column has to be given while here it depends on the name I will choose.
Is there any idea how I can make this?
Below you can find the link of the google spreadsheet that illustrates this example:https://docs.google.com/spreadsheets/d/1JvQL4GFuKM5HZXbUJ7bMpp40YD1QtNtHCXOAE2qoxcU/edit?usp=sharing