Auto Data Match

Occasional Contributor

Hello Everyone, Happy New Year to everyone.

I have a query and asking for help...

My query was, I have got the "Earliest expiry date"(Cell No P3) by the function =MIN(J3,G3,D3) I want the related batch number which is adjacent to that date in the last column which is "Batch Number of the earliest expiry"(Cell No Q3), for example ...

 Here the Expiry Date(Earliest)is 29-09-2011 which I have got by the function =MIN(J3,G3,D3) in Expiry Date(Earliest) column (Cell No P3)now I want the Batch Number of 29-09-2009 which is "AAC"(Cell No H3)(Adjacent to 29-09-2011), to be shown in the last column which is the "Batch Number of the earliest expiry"(Cell No Q3)automatically, I have marked "?" (question mark) in the below example.)

Stock in handExpiry datebatch numberBufferExpiry datebatch numberAmount purchasedExpiry dateBatch NumberCostStock dispensed to daily dispensing unitexpiry dateBalance in handExpiry date (earliest)batch number of the earliest expiry
1001-01-2012BBT212-01-2009AAC1029-09-2011FFF250501-01-20211712-01-2009 ???

I would be glad if you kindly provide me a solution.

4 Replies
best response confirmed by Sanket135 (Occasional Contributor)

@Sanket135 Guessing the exact cell references, but I believe you need to enter the following formula in Q3




Added a workbook for your convenience




Thank You so much, does the magic.
Thanks a lot, Have a nice day.