Double xlookup and dependent dropdowns = #N/A

Learner007

New Member
Joined
Feb 8, 2024
Messages
7
Office Version
  1. 365
Platform
  1. Windows
Help please
I have a simple double XLOOKUP and a simple dependent dropdown but something isn't working. I've tried to work it back but can't see what I'm doing wrong. I've searched and seen something N/A errors generate from formatting but I don't understand this really either.
Can someone help me?
doublexlookup.xlsx
CDEFGHIJ
2ArraysLists
3Occupation Band Cost OccupationDoctorNurseScientific
4Doctor FY1 £45.00DoctorFY1 Band 4Band 4
5Doctor FY2£51.00NurseFY2Band 5Band 5
6Doctor Registrar£73.00ScientificRegistrarBand 6Band 6
7Doctor Associate specialist£137.00Associate specialistBand 7Band 7
8Doctor Consultant medical£145.00Consultant medicalBand 8aBand 8a
9Nurse Band 4£39.00Band 8bBand 8b
10Nurse Band 5£48.00Band 8c Band 8c
11Nurse Band 6£59.00Band 8dBand 8d
12Nurse Band 7£69.00
13Nurse Band 8a£78.00
14Nurse Band 8b£90.00
15Nurse Band 8c £106.00XLOOKUP x 2
16Nurse Band 8d£125.00Occupation Band Cost
17Scientific Band 4£34.00DoctorFY2#N/A
18Scientific Band 5£41.00
19Scientific Band 6£53.00
20Scientific Band 7£64.00
21Scientific Band 8a£73.00
22Scientific Band 8b£86.00
23Scientific Band 8c £102.00
24Scientific Band 8d£121.00
Occs Bands and Costs
Cell Formulas
RangeFormula
I17I17=XLOOKUP(1,(Array_Occupation=G17)*(Array_Band=H17),Array_Occupation_cost)
Named Ranges
NameRefers ToCells
'Occs Bands and Costs'!Array_Band='Occs Bands and Costs'!$D$4:$D$24I17
'Occs Bands and Costs'!Array_Occupation='Occs Bands and Costs'!$C$4:$C$24I17
'Occs Bands and Costs'!Array_Occupation_cost='Occs Bands and Costs'!$E$4:$E$24I17
Cells with Data Validation
CellAllowCriteria
G17List=IF(H17="",Occupation,INDIRECT("FakeList"))
H17List=INDIRECT(G17)
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
You have trailing spaces on all the values in column C.
 
Upvote 0
Solution
You can get away with this but of course it would be better to clean up your data:
Excel Formula:
=XLOOKUP(1,(TRIM(Array_Occupation)=G17)*(Array_Band=H17),Array_Occupation_cost)
 
Upvote 0
=XLOOKUP(1,(Array_Occupation=G17)*(Array_Band=H17),Array_Occupation_cost)"

Umm thanks but I don't understand what's changed. I must admit I found this formula on another website so aren't sure what I'm getting away with.
 
Upvote 0
Alex added a TRIM function to remove the trailing spaces.
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,157
Members
453,021
Latest member
Justyna P

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