Search code examples
google-sheetsarray-formulas

Compare and Return Date Based on Criteria From Multiple Cells


I'm looking to compare dates in a Google Sheet and then return the last/latest date where multiple criteria matches.

Here is specifically what I'm trying to do...

...Find the last/latest release date from Column C (blue column), where Columns F, H, J and L (orange columns) ALL match the same column cells from all the other rows. Then return that last/latest date and fill it into Column D.

In this demo sheet here... https://docs.google.com/spreadsheets/d/1WgI8lr3y-68n7jzbcinG-s-YAmRXFrTg-K8SlDG98jM/

Between that description and the demo sheet, I hope that makes sense.

I did find another similar request (but couldn't make sense of how to adapt it to my own needs) here... Google Sheets - comparing dates and returning the latest row with requirements

Any help would be greatly appreciated. Thank you!

Edit: I missed up the "Expected Results" column but fixed it.


Solution

  • You may try:

    =let(Σ,map(F:F,H:H,J:J,L:L,lambda(f,h,j,l,join(,{f,h,j,l}))),
         map(C3:C,F3:F,H3:H,J3:J,L3:L,lambda(c,f,h,j,l,if(c="",,chooserows(filter(C:C,Σ=join(,{f,h,j,l})),-1)))))
    

    enter image description here