Search code examples
sortinggoogle-sheetsgoogle-sheets-formulamatchvlookup

Multiple Search Key in a Matrix


I'm trying to solve this problem since some days now but it seems I have reached a dead end. Maybe someone would be able to help me.

I have two sheets. The first one contains the list of my clients and their delivery number depending of the weekday.

Caption 1

In my second sheet I would like to get the delivery number of the client (red cells) depending of the weekday I select (yellow cells).

Caption 2

I tried VLOOKUP formula, INDEX/MATCH, QUERY but I wasn't able to find a way to get the delivery number depending of the client's name and the weekday. I think the main issue is that in the first sheet the weekday is a column title.

Maybe the solution is simply to build my tables differently...

Thank you for your help


Solution

  • all you need is simple vlookup:

    =INDEX(IFNA(VLOOKUP(A9:A11&B9:B11, 
     SPLIT(FLATTEN(A2:A4&B1:D1&"​​"&B2:D4), "​​"), 2, )))
    

    enter image description here