Forum Discussion
jhcj
Dec 06, 2024Copper Contributor
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.
- Harun24HRBronze Contributor
I would recommend using FILTER() function.
=FILTER(C2:C6,(A2:A6=B10)*(B2:B6=C10),"Not Found")
- Riny_van_EekelenPlatinum 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.
- jhcjCopper Contributor
Thank you both for this!