Multi-criteria lookup

Jedi Master

Board Regular
Joined
Jun 10, 2024
Messages
70
Office Version
  1. 365
Platform
  1. Windows
Hello Everyone! I have data created by a python script in a sheet. I am looking for help determining the correct formula to lookup the data in the table. The table looks as follows: Column 1 is employee name. The next 2 columns are a "Job Name (Column 2 has "2" after the same job name as previous column, and so on for the rest of the table through column EK. Row 2 in each column references Yes/No and a mileage value in each of the 2 job name columns.

1724704372548.png


I have the sheet where I am trying to lookup the table values:

1724704635084.png


I need to reference the job name (C13) and the employee name (C14) and retrieve the corresponding mileage value for that job for that person (D14) and the Yes/No value for that job for that person (E14). I am trying to use an Xlookup with &, but havent figured it out yet. Looking forward to any help with this. Thank you in advance!
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
This is what I came up with. I didn't put it into the same layout as your 2nd picture, since nothing there matched the list in the first picture.
Excel Formula:
=XLOOKUP(A18,$A$3:$A$14,XLOOKUP($B18&2,$B$1:$G$1,$B$3:$G$14))

Credit to Microsoft support page, example 5 XLOOKUP function - Microsoft Support


1724709442562.png
 
Last edited:
Upvote 1
Solution

Forum statistics

Threads
1,224,884
Messages
6,181,569
Members
453,054
Latest member
arz007

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top