Hello!
I am currently trying (and failing) to create a cross-sheet formula that will look for the most recent date for a given lot and then return a specific value from that date. Sounds simple enough right?
I have one column on my metrics sheet that correctly pulls the most recent date for a given lot:
=MAX(COLLECT({Assay Date}, {Raw Lot}, [Raw Lot ID]@row))
Where,
{Assay Date} is the date column on another sheet
{Raw Lot} is the unique identifier on another sheet
[Raw Lot ID]@row is the Raw lot I am looking for, AT4175 which is on the metric sheet. Metric sheet not shown since it is needed for this discussion.
This all works just fine and will return 4/30/21 from the data set below. Now on top of looking for the most recent assay date, I also would like to get the data value from the most recent assay of the specific lot. Here is a screenshot of the data set as an example:
My first attempt is as follows:
=VLOOKUP(MAX(COLLECT({Assay Date}, {Raw Lot}, [Raw Lot ID]@row)), {Characterization Experiments Range 3}, 2)
Where,
{Characterization Experiments Range 3} is the 2nd and 3rd columns shown above here.
This will return "99" since it is the highest value that matches the criteria and not 5 which is what I want it to return.
My second attempt was to two-fold in my aims; first to not use Vlookup since I plan on introducing and removing columns from the source sheet with some regularity and isnt a scalable option. The second aim was to have it return the desired 5.
=JOIN(COLLECT({SG1441 55C}, {Raw Lot}, [Raw Lot ID]@row, {Assay Date}, MAX(COLLECT({Assay Date}, {Raw Lot}, [Raw Lot ID]@row))), "-")
Where,
{SG1441 55C} is the 3rd column shown above
This will return "99-5".
Getting closer but not quite what I need. I at least got the 5 to be returned and knew that I would get both values. I just cant make the next leap of syntax understanding to get ONLY the 5 to be returned.
Any help would be greatly appreciated!