I have a rota listing names (down the side) and dates (across the top) and there is also an additional column for region/area for each name e.g.:
--Name--------Region-------13/12/19--------14/12/19--------15/12/19--------16/12/19-----------17/12/19
John Smith North IN IN OFF IN OFF
Jane Doe North OFF IN IN IN OFF
Bob Newhart South IN IN OFF OFF OFF
I also have a list of jobs completed by each person e.g.:
--Name--------Region-----Job#---CompletedDate-----JobType
John Smith 22 14/12/19 xx
John Smith 23 14/12/19 yy
John Smith 24 16/12/19 zz
Bob Newhart 25 14/12/19 aa
I know how to look up the Region from the name =INDEX(table[Region],MATCH(A2,table[Name],0),0)
and I've even worked out how to look up whether they're in or off based on a 2-way INDEX/MATCH (e.g. =INDEX(Rota!B:B,MATCH(A2,Rota!A:A,0),MATCH(D2,Rota!1:1,0))
My issue is when a person changes region e.g. John Smith moves from North to West:
--Name--------Region-------13/12/19--------14/12/19--------15/12/19--------16/12/19-----------17/12/19
John Smith North IN IN OFF
John Smith West IN OFF
Jane Doe North OFF IN IN IN OFF
Bob Newhart South IN IN OFF OFF OFF
I need to look up what their region was on the day the job was done so I can summarise the jobs done per region separately from the number of jobs done per person.
I'm guessing that it is something like the 2nd INDEX/MATCH above but with some form of "if the cell is blank then move down to the next match of their name in the same column". Does that even make sense?
Any help would be appreciated.
Thanks, Alan