Hello,
Here is the spreadsheet I have: (simplified)
This is saying which shift corresponds to which staff every day.
[TABLE="width: 500"]
<tbody>[TR]
[TD]Day[/TD]
[TD]Shift[/TD]
[TD]Staff 1[/TD]
[TD]Staff 2[/TD]
[TD]Staff 3[/TD]
[/TR]
[TR]
[TD]Monday[/TD]
[TD]10:00[/TD]
[TD][/TD]
[TD]x[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Monday[/TD]
[TD]15:00[/TD]
[TD]x[/TD]
[TD][/TD]
[TD]x[/TD]
[/TR]
[TR]
[TD]Monday[/TD]
[TD]20:00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Tuesday[/TD]
[TD]10:00[/TD]
[TD][/TD]
[TD]x[/TD]
[TD]x[/TD]
[/TR]
[TR]
[TD]Tuesday[/TD]
[TD]15:00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Tuesday[/TD]
[TD]20:00[/TD]
[TD]x[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
And here is the output I would want to get:
[TABLE="width: 500"]
<tbody>[TR]
[TD]Day[/TD]
[TD]Function[/TD]
[TD]Shift[/TD]
[/TR]
[TR]
[TD]Monday[/TD]
[TD]Staff 1[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Monday[/TD]
[TD]Staff 2[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Monday[/TD]
[TD]Staff 3[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Tuesday[/TD]
[TD]Staff 1[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Tuesday[/TD]
[TD]Staff 2[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Tuesday[/TD]
[TD]Staff 3[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I am looking here for the shift corresponding to each staff on each day. I would like to have only one formula for the whole table as the database is quite big.
I have tried with an INDEX MATCH function and I was able to get the shift for each staff but I couldn't get the "day" variable with it. I would like to do: INDEX(Shift column ONLY for Monday; MATCH("x";INDEX(The whole table;0;MATCH("Staff 1"; Column headers;0);0);0)
But I do not know how to do the "Shift column ONLY for Monday" range.
Do you know any way to do this?
Thank you very much for your help!
Gedeon
Here is the spreadsheet I have: (simplified)
This is saying which shift corresponds to which staff every day.
[TABLE="width: 500"]
<tbody>[TR]
[TD]Day[/TD]
[TD]Shift[/TD]
[TD]Staff 1[/TD]
[TD]Staff 2[/TD]
[TD]Staff 3[/TD]
[/TR]
[TR]
[TD]Monday[/TD]
[TD]10:00[/TD]
[TD][/TD]
[TD]x[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Monday[/TD]
[TD]15:00[/TD]
[TD]x[/TD]
[TD][/TD]
[TD]x[/TD]
[/TR]
[TR]
[TD]Monday[/TD]
[TD]20:00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Tuesday[/TD]
[TD]10:00[/TD]
[TD][/TD]
[TD]x[/TD]
[TD]x[/TD]
[/TR]
[TR]
[TD]Tuesday[/TD]
[TD]15:00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Tuesday[/TD]
[TD]20:00[/TD]
[TD]x[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
And here is the output I would want to get:
[TABLE="width: 500"]
<tbody>[TR]
[TD]Day[/TD]
[TD]Function[/TD]
[TD]Shift[/TD]
[/TR]
[TR]
[TD]Monday[/TD]
[TD]Staff 1[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Monday[/TD]
[TD]Staff 2[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Monday[/TD]
[TD]Staff 3[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Tuesday[/TD]
[TD]Staff 1[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Tuesday[/TD]
[TD]Staff 2[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Tuesday[/TD]
[TD]Staff 3[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I am looking here for the shift corresponding to each staff on each day. I would like to have only one formula for the whole table as the database is quite big.
I have tried with an INDEX MATCH function and I was able to get the shift for each staff but I couldn't get the "day" variable with it. I would like to do: INDEX(Shift column ONLY for Monday; MATCH("x";INDEX(The whole table;0;MATCH("Staff 1"; Column headers;0);0);0)
But I do not know how to do the "Shift column ONLY for Monday" range.
Do you know any way to do this?
Thank you very much for your help!
Gedeon