Forum Discussion

jhcj's avatar
jhcj
Copper Contributor
Dec 06, 2024

Filling values if conditions are met

I want to have excel use a lookup to fill up a column if below criterias are met (I will update these criterias in a separate sheet as a table): 

So for example, my spreadsheet would look like below: 

So if I key in "Wong" and "China", then under Equipment the formula would look up the criteria table and enter "20ST" as a value. 

 

If I key in "Brad" and "UK" instead, then "40OT" would be the value. 

 

Appreciate the help! 

  • Assuming you are using a modern Excel version try this:

    =XLOOKUP(
        A10 & "_" & B10,
        Table3[Customer] & "_" & Table3[Origin],
        Table3[Equipment],
        "Not found"
    )

    where Table3 refers to a table as shown in the picture below.

     

  • Riny_van_Eekelen's avatar
    Riny_van_Eekelen
    Platinum Contributor

    Assuming you are using a modern Excel version try this:

    =XLOOKUP(
        A10 & "_" & B10,
        Table3[Customer] & "_" & Table3[Origin],
        Table3[Equipment],
        "Not found"
    )

    where Table3 refers to a table as shown in the picture below.

     

Resources