Filter on decremental list

Dirkske72

New Member
Joined
Oct 14, 2024
Messages
3
Office Version
  1. 365
Platform
  1. Windows
I'm trying to build a planning sheet for drivers on different routes based on their availability and knowledge of the routes. Let me try to clarify this : I have 5 drivers, each of them knows 2 different routes, they all have availabilities from monday to friday. I need to plan for a given day for each route a driver according to it's knowledge and availability. Of course each driver can only drive one route. There is also my problem I'm using a Filter function that looks like this =FILTER($B$4:$B$8,($C$4:$C$8=L4)*($F$4:$F$8="x"),FILTER($B$4:$B$8,($D$4:$D$8=L4)*($F$4:$F$8="x"),"OPEN")), problem is that I searches everytime the whole list of drivers, where it shopuld be able to search only drivers that haven't been selected yet. I haven't found a solution for that last bit... Any help on this ?
Driver planning.xlsx
ABCDEFGHIJKLM
1
2Prefered AvailablePlanning
3DriverRoute 1Route 2MonTueWedThuFriRouteMon
4D1R1R3xxxxxR1D1
5D2R2R4 R2D3
6D3R4R2xxxxxR3D4
7D4R3R5xxxxxR4D3
8D5R5R1xxxxxR5D5
9
Sheet1
Cell Formulas
RangeFormula
M4:M8M4=FILTER($B$4:$B$8,($C$4:$C$8=L4)*($F$4:$F$8="x"),FILTER($B$4:$B$8,($D$4:$D$8=L4)*($F$4:$F$8="x"),"OPEN"))
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
problem is that I searches everytime the whole list of drivers, where it shopuld be able to search only drivers that haven't been selected yet. I haven't found a solution for that last bit... Any help on this ?
Welcome to the MrExcel board!
Does this cover that part of it?

24 10 15.xlsm
BCDEFGHIJKLM
1
2PreferedAvailablePlanning
3DriverRoute 1Route 2MonTueWedThuFriRouteMon
4D1R1R3xxxxxR1D1
5D2R2R4R2D3
6D3R4R2xxxxxR3D4
7D4R3R5xxxxxR4OPEN
8D5R5R1xxxxxR5D5
Drivers
Cell Formulas
RangeFormula
M4:M8M4=FILTER(B$4:B$8,(C$4:C$8=L4)*(F$4:F$8="x")*ISNA(MATCH(B$4:B$8,M$3:M3,0)),FILTER(B$4:B$8,(D$4:D$8=L4)*(F$4:F$8="x")*ISNA(MATCH(B$4:B$8,M$3:M3,0)),"OPEN"))
 
Upvote 0
Solution
Thanks this does indeed solve it. Could you explain a bit your solution (for my understanding) please ?
 
Upvote 0
Your filters filter the drivers based on their knowledge of the route and their availability. Mine add one more condition and that is that their name does not already exist in column M above the cell that the particular formula is in
ISNA(MATCH(B$4:B$8,M$3:M3,0))
If a driver name is not in the column above the formula then trying to MATCH it will produce an #N/A error so ISNA will be true so that driver is still in the mix (provided the other conditions are also true for them)

Example. In cell M7, drivers that know the route are D2 and D3. However, D2 is not available so that leaves D3. But D3 already exists above cell M7 (in M5) so D3 is also ruled out, leaving nobody. Hence OPEN
 
Upvote 0
Thanks for the clarification, that is exactly what I was looking for, but I could find a way to implement it. Now I also understand how you solved it :cool:
 
Upvote 0

Forum statistics

Threads
1,224,814
Messages
6,181,128
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