Hi there,
I have a vlookup to pull in sample results, but occasionally we will have the same P# with multiple results, and I only would like to pull in column G (Sample Status) from the latest result if there are multiple samples with the same P#. Any suggestions? My current Vlookup is as follows (column O in another worksheet lists P#).
In the example below, I would want the vlookup to show "Requested Pending Result" (since it was the latest "recevied date" until we have a date in colunmn F, and then to pull in column G once we have a result date. Would this be possible?
=IFERROR(IF(VLOOKUP(O:O,SAMPLES!A:F,6,0)="","Requested Pending Result",VLOOKUP(O:O,SAMPLES!A:G,7,0))," ")
[TABLE="width: 843"]
<tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[/TR]
[TR]
[TD]FORMATTED_PO[/TD]
[TD]SAMPLE_NO[/TD]
[TD]SMPL_DESC[/TD]
[TD]REQ_DATE[/TD]
[TD]RCVD_DATE[/TD]
[TD]RESULT_DATE[/TD]
[TD]SAMPLE_STATUS[/TD]
[/TR]
[TR]
[TD]P-8857-A[/TD]
[TD]33764[/TD]
[TD]Arrival Samples[/TD]
[TD]7/5/2018[/TD]
[TD]7/9/2018[/TD]
[TD][/TD]
[TD]PENDING[/TD]
[/TR]
[TR]
[TD]P-8857-A[/TD]
[TD]33751[/TD]
[TD]Arrival Samples[/TD]
[TD]6/28/2018[/TD]
[TD]7/3/2018[/TD]
[TD]7/5/2018 0:00[/TD]
[TD]REJECTED[/TD]
[/TR]
[TR]
[TD]P-8857-A[/TD]
[TD]33750[/TD]
[TD]Arrival Samples[/TD]
[TD]6/28/2018[/TD]
[TD]7/3/2018[/TD]
[TD]7/5/2018 0:00[/TD]
[TD]REJECTED[/TD]
[/TR]
</tbody>[/TABLE]
I have a vlookup to pull in sample results, but occasionally we will have the same P# with multiple results, and I only would like to pull in column G (Sample Status) from the latest result if there are multiple samples with the same P#. Any suggestions? My current Vlookup is as follows (column O in another worksheet lists P#).
In the example below, I would want the vlookup to show "Requested Pending Result" (since it was the latest "recevied date" until we have a date in colunmn F, and then to pull in column G once we have a result date. Would this be possible?
=IFERROR(IF(VLOOKUP(O:O,SAMPLES!A:F,6,0)="","Requested Pending Result",VLOOKUP(O:O,SAMPLES!A:G,7,0))," ")
[TABLE="width: 843"]
<tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[/TR]
[TR]
[TD]FORMATTED_PO[/TD]
[TD]SAMPLE_NO[/TD]
[TD]SMPL_DESC[/TD]
[TD]REQ_DATE[/TD]
[TD]RCVD_DATE[/TD]
[TD]RESULT_DATE[/TD]
[TD]SAMPLE_STATUS[/TD]
[/TR]
[TR]
[TD]P-8857-A[/TD]
[TD]33764[/TD]
[TD]Arrival Samples[/TD]
[TD]7/5/2018[/TD]
[TD]7/9/2018[/TD]
[TD][/TD]
[TD]PENDING[/TD]
[/TR]
[TR]
[TD]P-8857-A[/TD]
[TD]33751[/TD]
[TD]Arrival Samples[/TD]
[TD]6/28/2018[/TD]
[TD]7/3/2018[/TD]
[TD]7/5/2018 0:00[/TD]
[TD]REJECTED[/TD]
[/TR]
[TR]
[TD]P-8857-A[/TD]
[TD]33750[/TD]
[TD]Arrival Samples[/TD]
[TD]6/28/2018[/TD]
[TD]7/3/2018[/TD]
[TD]7/5/2018 0:00[/TD]
[TD]REJECTED[/TD]
[/TR]
</tbody>[/TABLE]