XLOOKUP filtering for one look up value but not another.

Queeza

New Member
Joined
Jun 9, 2018
Messages
12
Office Version
  1. 365
Platform
  1. Windows
Hello
I have a column of job numbers that I need to filter by Project Manager. The Project Manager is selected from a drop-down list.
XLOOKUP is filtering for EP but returns all values for SM.

Any help with this would be appreciated.

The formular I'm using is:
Cell H3: =IF(XLOOKUP($K$1,$A$3:$A$34,B3:B34,"",0,1)=0,"",(XLOOKUP($K$1,$A$3:$A$34,B3:B34,"",0,1)))
Cell H4: =IF(XLOOKUP($K$1,$A$3:$A$34,B4:B35,"",0,1)=0,"",(XLOOKUP($K$1,$A$3:$A$34,B4:B35,"",0,1)))
Cell H5: =IF(XLOOKUP($K$1,$A$3:$A$34,B5:B36,"",0,1)=0,"",(XLOOKUP($K$1,$A$3:$A$34,B5:B36,"",0,1)))
.
XLOOKUP - SM.jpg
XLOOKUP - EP.jpg
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
why don't you use the Filter formula for simplicity

Excel Formula:
=FILTER($B$3:$B$34,A3:A34=K1,"")
 
Upvote 0
I finally worked out how to get the mini sheet in. For some reason I can't select D1 to activate the drop-down box.
The filter suggestions, thank you, I couldn't get to work.
Hopefully the mini sheet will better explain the situation. This is just a small part of a large workbook producing graphs and visual representation of expenditure.
Again, any help would be appreciated.

Xlookup problem.xlsx
ABCDEFGHIJKLM
1NORTH2024-2025Project ManagerSMProgram ManagerEPHIDEHIDEHIDE
22024-2025 Expenditure for NORTH DistrictSMProcess FunctionProject DescriptionProject ManagerWork Order DescriptionWork Order
3DistrictWork OrderWork Order DescriptionProject DescriptionLookup TitleGraph TitleProcess FunctionLine MarkingLine Marking - NorthSMANNUAL: CNTL PARKING SCHEMES - Lines andM000064
4NORTHM000064ANNUAL: CNTL PARKING SCHEMES - Lines andLine Marking - NorthM000064 - ANNUAL: CNTL PARKING SCHEMES - Lines and2024-2025 Expenditure for M000064 - ANNUAL: CNTL PARKING SCHEMES - Lines andLine MarkingLine MarkingLine Marking - NorthSMANNUAL: NORTH PARKING SCHEMES - Lines anM000065
5NORTHM000065ANNUAL: NORTH PARKING SCHEMES - Lines anLine Marking - NorthM000065 - ANNUAL: NORTH PARKING SCHEMES - Lines an2024-2025 Expenditure for M000065 - ANNUAL: NORTH PARKING SCHEMES - Lines anLine MarkingBridge InfrastructureFoot Bridge Maintenance - NorthSMFoot Bridge MaintenanceM000097
6NORTHM000097Foot Bridge MaintenanceFoot Bridge Maintenance - NorthM000097 - Foot Bridge Maintenance2024-2025 Expenditure for M000097 - Foot Bridge MaintenanceBridge InfrastructureFootpaths & CyclewaysFormed Path Maintenance - NorthSMFormed Path MaintenanceM000098
7NORTHM000098Formed Path MaintenanceFormed Path Maintenance - NorthM000098 - Formed Path Maintenance2024-2025 Expenditure for M000098 - Formed Path MaintenanceFootpaths & CyclewaysFootpaths & CyclewaysFormed Path Cleaning - NorthSMFormed Path CleaningM000099
8NORTHM000099Formed Path CleaningFormed Path Cleaning - NorthM000099 - Formed Path Cleaning2024-2025 Expenditure for M000099 - Formed Path CleaningFootpaths & CyclewaysFootpaths & CyclewaysFormed Path Cleaning - NorthSMFormed Path Cleaning (CBD)M000100
9NORTHM000100Formed Path Cleaning (CBD)Formed Path Cleaning - NorthM000100 - Formed Path Cleaning (CBD)2024-2025 Expenditure for M000100 - Formed Path Cleaning (CBD)Footpaths & CyclewaysFootpaths & CyclewaysPath Sweeping (High Profile) - NorthSMPath Sweeping (High Profile)M000101
10NORTHM000101Path Sweeping (High Profile)Path Sweeping (High Profile) - NorthM000101 - Path Sweeping (High Profile)2024-2025 Expenditure for M000101 - Path Sweeping (High Profile)Footpaths & CyclewaysFootpaths & CyclewaysPath Sweeping (Suburban) - NorthSMPath Sweeping (Suburban)M000102
11NORTHM000102Path Sweeping (Suburban)Path Sweeping (Suburban) - NorthM000102 - Path Sweeping (Suburban)2024-2025 Expenditure for M000102 - Path Sweeping (Suburban)Footpaths & CyclewaysHigh ProfileHigh Profile Area Maint (CBD) - NorthSMHigh Profile Area Maintenance (CBD)M000103
12NORTHM000103High Profile Area Maintenance (CBD)High Profile Area Maint (CBD) - NorthM000103 - High Profile Area Maintenance (CBD)2024-2025 Expenditure for M000103 - High Profile Area Maintenance (CBD)High ProfileKerb & ChannelKerb & Channel Maintenance - NorthSMKerb & Channel MaintenanceM000104
13NORTHM000104Kerb & Channel MaintenanceKerb & Channel Maintenance - NorthM000104 - Kerb & Channel Maintenance2024-2025 Expenditure for M000104 - Kerb & Channel MaintenanceKerb & ChannelRoad InfrastructureUnsealed Road Maintenance - NorthSMUnsealed Road MaintenanceM000105
14NORTHM000105Unsealed Road MaintenanceUnsealed Road Maintenance - NorthM000105 - Unsealed Road Maintenance2024-2025 Expenditure for M000105 - Unsealed Road MaintenanceRoad InfrastructureRoad InfrastructureUnsealed Shoulder Maintenance - NorthSMUnsealed Shoulder MaintenanceM000106
15NORTHM000106Unsealed Shoulder MaintenanceUnsealed Shoulder Maintenance - NorthM000106 - Unsealed Shoulder Maintenance2024-2025 Expenditure for M000106 - Unsealed Shoulder MaintenanceRoad InfrastructureRoad InfrastructurePothole Repairs - NorthSMPothole RepairsM000107
16NORTHM000107Pothole RepairsPothole Repairs - NorthM000107 - Pothole Repairs2024-2025 Expenditure for M000107 - Pothole RepairsRoad InfrastructureRoad InfrastructureEdge Break Repairs - NorthSMEdge Break RepairsM000108
17NORTHM000108Edge Break RepairsEdge Break Repairs - NorthM000108 - Edge Break Repairs2024-2025 Expenditure for M000108 - Edge Break RepairsRoad InfrastructureRoad InfrastructureMinor Reseals - NorthSMMinor ResealsM000109
18NORTHM000109Minor ResealsMinor Reseals - NorthM000109 - Minor Reseals2024-2025 Expenditure for M000109 - Minor ResealsRoad InfrastructureStreet SweepingStreet Sweeping - NorthSMStreet SweepingM000110
19NORTHM000110Street SweepingStreet Sweeping - NorthM000110 - Street Sweeping2024-2025 Expenditure for M000110 - Street SweepingStreet SweepingStreet SweepingStreet Sweeping - NorthSMStreet Sweeping (CBD)M000111
20NORTHM000111Street Sweeping (CBD)Street Sweeping - NorthM000111 - Street Sweeping (CBD)2024-2025 Expenditure for M000111 - Street Sweeping (CBD)Street SweepingLine MarkingLine Marking - SouthEPANNUAL: SOUTH PARKING SCHEMES - Lines anM000066
21NORTHM000066ANNUAL: SOUTH PARKING SCHEMES - Lines anLine Marking - SouthM000066 - ANNUAL: SOUTH PARKING SCHEMES - Lines an2024-2025 Expenditure for M000066 - ANNUAL: SOUTH PARKING SCHEMES - Lines anLine MarkingBridge InfrastructureFoot Bridge Maintenance - SouthEPFoot Bridge MaintenanceM000233
22NORTHM000233Foot Bridge MaintenanceFoot Bridge Maintenance - SouthM000233 - Foot Bridge Maintenance2024-2025 Expenditure for M000233 - Foot Bridge MaintenanceBridge InfrastructureBridge InfrastructureRoad Bridge MaintenanceEPRoad Bridge MaintenanceM000234
23NORTHM000234Road Bridge MaintenanceRoad Bridge MaintenanceM000234 - Road Bridge Maintenance2024-2025 Expenditure for M000234 - Road Bridge MaintenanceBridge InfrastructureFootpaths & CyclewaysUnformed Path Maintenance - SouthEPUnformed Path MaintenanceM000235
24NORTHM000235Unformed Path MaintenanceUnformed Path Maintenance - SouthM000235 - Unformed Path Maintenance2024-2025 Expenditure for M000235 - Unformed Path MaintenanceFootpaths & CyclewaysFootpaths & CyclewaysFormed Path Maintenance - SouthEPFormed Path MaintenanceM000236
25NORTHM000236Formed Path MaintenanceFormed Path Maintenance - SouthM000236 - Formed Path Maintenance2024-2025 Expenditure for M000236 - Formed Path MaintenanceFootpaths & CyclewaysFootpaths & CyclewaysFormed Path Cleaning - SouthEPFormed Path CleaningM000237
26NORTHM000237Formed Path CleaningFormed Path Cleaning - SouthM000237 - Formed Path Cleaning2024-2025 Expenditure for M000237 - Formed Path CleaningFootpaths & CyclewaysFootpaths & CyclewaysPath Sweeping (Suburban) - SouthEPPath Sweeping (Suburban)M000238
27NORTHM000238Path Sweeping (Suburban)Path Sweeping (Suburban) - SouthM000238 - Path Sweeping (Suburban)2024-2025 Expenditure for M000238 - Path Sweeping (Suburban)Footpaths & CyclewaysKerb & ChannelKerb & Channel Maintenance - SouthEPKerb & Channel MaintenanceM000239
28NORTHM000239Kerb & Channel MaintenanceKerb & Channel Maintenance - SouthM000239 - Kerb & Channel Maintenance2024-2025 Expenditure for M000239 - Kerb & Channel MaintenanceKerb & ChannelRoad InfrastructureUnsealed Road Maintenance - SouthEPUnsealed Road MaintenanceM000240
29NORTHM000240Unsealed Road MaintenanceUnsealed Road Maintenance - SouthM000240 - Unsealed Road Maintenance2024-2025 Expenditure for M000240 - Unsealed Road MaintenanceRoad InfrastructureRoad InfrastructureUnsealed Shoulder Maintenance - SouthEPUnsealed Shoulder MaintenanceM000241
30NORTHM000241Unsealed Shoulder MaintenanceUnsealed Shoulder Maintenance - SouthM000241 - Unsealed Shoulder Maintenance2024-2025 Expenditure for M000241 - Unsealed Shoulder MaintenanceRoad InfrastructureRoad InfrastructurePothole Repairs - SouthEPPothole RepairsM000242
31NORTHM000242Pothole RepairsPothole Repairs - SouthM000242 - Pothole Repairs2024-2025 Expenditure for M000242 - Pothole RepairsRoad InfrastructureRoad InfrastructureEdge Break Repairs - SouthEPEdge Break RepairsM000243
32NORTHM000243Edge Break RepairsEdge Break Repairs - SouthM000243 - Edge Break Repairs2024-2025 Expenditure for M000243 - Edge Break RepairsRoad InfrastructureRoad InfrastructureMinor Reseals - SouthEPMinor ResealsM000244
33NORTHM000244Minor ResealsMinor Reseals - SouthM000244 - Minor Reseals2024-2025 Expenditure for M000244 - Minor ResealsRoad InfrastructureStreet SweepingStreet Sweeping - SouthEPStreet SweepingM000245
Titles
Cell Formulas
RangeFormula
A1A1=IFS(D1="EP","SOUTH",D1="SM","NORTH")
F2F2=CONCATENATE(B1," ","Expenditure for"," ",A1," ","District")
A4:A33A4=IF(B4="","",$A$1)
B4:B33B4=IF(XLOOKUP($D$1,Titles!$K$3:$K$33,Titles!M3:M33,"",0,1)=0,"",(XLOOKUP($D$1,Titles!$K$3:$K$33,Titles!M3:M33,"",0,1)))
C4:C33C4=IF(XLOOKUP($D$1,Titles!$K$3:$K$33,Titles!$L3:$L33,"",0,1)=0,"",XLOOKUP($D$1,Titles!$K$3:$K$33,Titles!$L3:$L33,"",0,1))
D4:D33D4=IF(XLOOKUP($D$1,Titles!$K$3:$K$33,Titles!J3:J33,"",0,1)=0,"",XLOOKUP($D$1,Titles!$K$3:$K$33,Titles!$J3:$J33,"",0,1))
E4:E33E4=IF(B4="","",CONCATENATE(B4," - ",C4))
F4:F33F4=IF(B4="","",CONCATENATE($B$1," Expenditure for ",B4," - ",C4))
G4:G33G4=IF(XLOOKUP($D$1,$K$3:$K$33,I3:I33,"",0,1)=0,"",(XLOOKUP($D$1,$K$3:$K$33,I3:I33,"",0,1)))
Cells with Data Validation
CellAllowCriteria
D1List=$H$1:$H$2
 
Upvote 0
You haven't shown us your Titles worksheet.

But based on the formulae you're using, and the fact that our Filter suggestion isn't working for you, I am guessing that your Project Manager column is not fully populated?

ABCDEF
1Project DescriptionProject ManagerWork Order DescriptionWork Order
2
3BlahXXBlahBlah
4BlahBlahBlah
5Line Marking - NorthSMANNUAL: CNTL PARKING SCHEMES - Lines andM000064
6Line Marking - NorthANNUAL: NORTH PARKING SCHEMES - Lines anM000065
7Foot Bridge Maintenance - NorthFoot Bridge MaintenanceM000097
8Formed Path Maintenance - NorthFormed Path MaintenanceM000098
9Formed Path Cleaning - NorthFormed Path CleaningM000099
10BlahYYBlahBlah
11BlahBlahBlah
12BlahBlahBlah
13BlahZZBlahBlah
14BlahBlahBlah
15
16Doesn't work
17Project Description
18SMLine Marking - North
19
20Does work
21SMLine Marking - North
22Line Marking - North
23Foot Bridge Maintenance - North
24Formed Path Maintenance - North
25Formed Path Cleaning - North
26
Titles
Cell Formulas
RangeFormula
B18B18=FILTER(B3:B14,C3:C14=A18)
B21:B25B21=FILTER(B3:B14,SCAN("",C3:C14,LAMBDA(a,b,IF(b="",a,b)))=A21,"n/a")
Dynamic array formulas.
 
Upvote 0
why don't you use the Filter formula for simplicity

Excel Formula:
=FILTER($B$3:$B$34,A3:A34=K1,"")
Thaks SonyAlv - I couldn't get this to work for some reason. Due to the report I use for this now being changed, I'm going to go in whole different direction. Thanks for you time.
 
Upvote 0
You haven't shown us your Titles worksheet.

But based on the formulae you're using, and the fact that our Filter suggestion isn't working for you, I am guessing that your Project Manager column is not fully populated?

ABCDEF
1Project DescriptionProject ManagerWork Order DescriptionWork Order
2
3BlahXXBlahBlah
4BlahBlahBlah
5Line Marking - NorthSMANNUAL: CNTL PARKING SCHEMES - Lines andM000064
6Line Marking - NorthANNUAL: NORTH PARKING SCHEMES - Lines anM000065
7Foot Bridge Maintenance - NorthFoot Bridge MaintenanceM000097
8Formed Path Maintenance - NorthFormed Path MaintenanceM000098
9Formed Path Cleaning - NorthFormed Path CleaningM000099
10BlahYYBlahBlah
11BlahBlahBlah
12BlahBlahBlah
13BlahZZBlahBlah
14BlahBlahBlah
15
16Doesn't work
17Project Description
18SMLine Marking - North
19
20Does work
21SMLine Marking - North
22Line Marking - North
23Foot Bridge Maintenance - North
24Formed Path Maintenance - North
25Formed Path Cleaning - North
26
Titles
Cell Formulas
RangeFormula
B18B18=FILTER(B3:B14,C3:C14=A18)
B21:B25B21=FILTER(B3:B14,SCAN("",C3:C14,LAMBDA(a,b,IF(b="",a,b)))=A21,"n/a")
Dynamic array formulas.
Just started a whole new spreadsheet and this is working. Thanks so much.
 
Upvote 0
Solution

Forum statistics

Threads
1,223,885
Messages
6,175,178
Members
452,615
Latest member
bogeys2birdies

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