[TABLE="width: 305"]
<colgroup><col><col><col><col></colgroup><tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD]NAME[/TD]
[TD]DOI[/TD]
[TD]Dept[/TD]
[TD]OSHA[/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]3/8/2019[/TD]
[TD]Grocery[/TD]
[TD]Yes[/TD]
[/TR]
[TR]
[TD]Isa[/TD]
[TD]3/19/2019[/TD]
[TD]Perishable[/TD]
[TD]No[/TD]
[/TR]
[TR]
[TD]Dave[/TD]
[TD]3/24/2019[/TD]
[TD]Grocery[/TD]
[TD]No[/TD]
[/TR]
[TR]
[TD]Phil[/TD]
[TD]3/25/2019[/TD]
[TD]Perishable[/TD]
[TD]No[/TD]
[/TR]
[TR]
[TD]Eric[/TD]
[TD]3/26/2019[/TD]
[TD]Perishable[/TD]
[TD]Yes[/TD]
[/TR]
[TR]
[TD]Anne[/TD]
[TD]3/28/2019[/TD]
[TD]Grocery[/TD]
[TD]Yes[/TD]
[/TR]
[TR]
[TD]Jack[/TD]
[TD]4/1/2019[/TD]
[TD]Perishable[/TD]
[TD]Yes[/TD]
[/TR]
</tbody>[/TABLE]
So, I've been scouring the boards for quite some time and I can't seem to process how to get this formula to work. I have my sheet set up so I can find the last injury (DOI) for each Department (Dept). I cannot manage to incorporate a second criteria that will limit the results to (OSHA = Yes), however.
What I am trying to accomplish is to look (in a much, much bigger file) at the dates of injuries and return the last injury for each Department, only when it is an OSHA incident. The formula that worked to get all but the OSHA perspective is:
=LOOKUP(2,1/('[Book1]Injuries '!$D:$D="Grocery"),'[Book1]Injuries '!$B:$B)
Some sensitive info within the workbooks, so I apologize for some of the strange references, but assume Book1 is the workbook and the sheet name Injuries, accordingly.
<colgroup><col><col><col><col></colgroup><tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD]NAME[/TD]
[TD]DOI[/TD]
[TD]Dept[/TD]
[TD]OSHA[/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]3/8/2019[/TD]
[TD]Grocery[/TD]
[TD]Yes[/TD]
[/TR]
[TR]
[TD]Isa[/TD]
[TD]3/19/2019[/TD]
[TD]Perishable[/TD]
[TD]No[/TD]
[/TR]
[TR]
[TD]Dave[/TD]
[TD]3/24/2019[/TD]
[TD]Grocery[/TD]
[TD]No[/TD]
[/TR]
[TR]
[TD]Phil[/TD]
[TD]3/25/2019[/TD]
[TD]Perishable[/TD]
[TD]No[/TD]
[/TR]
[TR]
[TD]Eric[/TD]
[TD]3/26/2019[/TD]
[TD]Perishable[/TD]
[TD]Yes[/TD]
[/TR]
[TR]
[TD]Anne[/TD]
[TD]3/28/2019[/TD]
[TD]Grocery[/TD]
[TD]Yes[/TD]
[/TR]
[TR]
[TD]Jack[/TD]
[TD]4/1/2019[/TD]
[TD]Perishable[/TD]
[TD]Yes[/TD]
[/TR]
</tbody>[/TABLE]
So, I've been scouring the boards for quite some time and I can't seem to process how to get this formula to work. I have my sheet set up so I can find the last injury (DOI) for each Department (Dept). I cannot manage to incorporate a second criteria that will limit the results to (OSHA = Yes), however.
What I am trying to accomplish is to look (in a much, much bigger file) at the dates of injuries and return the last injury for each Department, only when it is an OSHA incident. The formula that worked to get all but the OSHA perspective is:
=LOOKUP(2,1/('[Book1]Injuries '!$D:$D="Grocery"),'[Book1]Injuries '!$B:$B)
Some sensitive info within the workbooks, so I apologize for some of the strange references, but assume Book1 is the workbook and the sheet name Injuries, accordingly.