Dear reader,
I'm trying to match 2 tables to quickly put the right amount of hours behind a certain shift.
So I got this table with the hours:
And I got an employee shift page like this:
So if the shift column contains "fst" or "fd" it should grab the hours from the fd/fst column corresponding to the right shift code. If the shift description doesn't contain "fd" or "fst" it should grab the hours from the corresponding day and shiftcode.
I'm having trouble getting this to work in hours column.
Any help is much appreciated!
I'm trying to match 2 tables to quickly put the right amount of hours behind a certain shift.
So I got this table with the hours:
Shift | Ma | Di | Wo | Do | Vr | Za | Zo | Fd/fst |
AW | 5,5 | 5,5 | 5,5 | 5,5 | 5,5 | 24 | 24 | 24 |
NAC | 5,5 | 5,5 | 5,5 | 5,5 | 5,5 | 6 | 7 | 7 |
NAV | 6 | 6 | 6 | 6 | 6 | 7 | 7 | 7 |
NDC1 | 0 | 0 | 0 | 0 | 0 | 8 | 8 | 8 |
And I got an employee shift page like this:
Date | Day | Code | Shift | Hours |
09-01-2018 | di | AW | AW wk | 5,5 |
21-01-2018 | zo | NAC | NAC fd | 7 |
02-02-2018 | vr | NAC | NAC wk | 5,5 |
08-03-2018 | do | NAV | NAV wk | 6 |
17-03-2018 | za | NDC1 | NDC1 wknd | 8 |
04-04-2018 | za | NAC | NAC wknd | 6 |
So if the shift column contains "fst" or "fd" it should grab the hours from the fd/fst column corresponding to the right shift code. If the shift description doesn't contain "fd" or "fst" it should grab the hours from the corresponding day and shiftcode.
I'm having trouble getting this to work in hours column.
Any help is much appreciated!