Forum Discussion
Using Filter will not allow me to expand the array of multiple conditions (as it should).
Hi All,
I am trying to make a very specific Service Planner for vehicles.
I have a range in Spreadsheet "Workings" that looks like that (Screenshot below). In Row 1 from Column I up to Column FC each cell has written either 10M, 10A or 10C in it. The dates are populated for each Vehicle from row 2 onward.
In another spreadsheet "Planner" I have the dates in a year in row 4 and trying to pull the 10M, 10A or 10C from the first sheet by using Filter that correspond to each vehicle (screenshot below). Using Filter is requirement because there are sometime more than one occurrences for the same date.
The highlighted formula above is where I need help.
FILTER(TRANSPOSE(Workings!$I$1:$FC$1), (TRANSPOSE(Workings!$I3:$FC3)=Planner!K$4)*(TRANSPOSE(Workings!$C3:$C3)=Planner!$C5), "")
This is all working perfectly, but only because I am giving the filter exact rows to include (Row 3).
The desired outcome is that I should be able to change the Vehicle registration in Cell C5 and it should be searching for it in Workings spreadsheet.
I tried expanding the conditions array it but it returns an error Value. - FILTER(TRANSPOSE(Workings!$I$1:$FC$1), (TRANSPOSE(Workings!$I2:$FC10)=Planner!K$4)*(TRANSPOSE(Workings!$C2:$C10)=Planner!$C5), "")
Link to example workbook: https://www.dropbox.com/scl/fi/761hz3b968cu82czazl0p/Service-Planner-Example.xlsx?rlkey=6t64d19osjuuctclmubnrz6y6&dl=0
Note: In the screenshot the Filter function is wrapped in Sort and Textjoin and Left as I want the results to be showing in only one cell, and then showing only the first result. But this is irrelevant for my question. It is the Filter function that I need to make to work.
This has been bugging me trying to solve it.
Please help.
Thanks.
In D5:
=IFERROR(INDEX(Workings!$I$1:$FC$1, MATCH(TRUE, (INDEX(Workings!$I$2:$FC$1000, MATCH($C5, Workings!$C$2:$C$1000, 0), 0)=D$4), 0)), "")
Increase the last row number 1000 if you have more than 1000 rows of data on the Workings sheet.
Fill down and to the right.
Could you attach a small sample workbook demonstrating the problem (without sensitive data), or if that is not possible, make it available through OneDrive, Google Drive, Dropbox or similar?
- GalinZCopper Contributor
Thank you Hans Vogelaar.
Here is the link: and you should be able to download it from there:Thanks.
In D5:
=IFERROR(INDEX(Workings!$I$1:$FC$1, MATCH(TRUE, (INDEX(Workings!$I$2:$FC$1000, MATCH($C5, Workings!$C$2:$C$1000, 0), 0)=D$4), 0)), "")
Increase the last row number 1000 if you have more than 1000 rows of data on the Workings sheet.
Fill down and to the right.