Feed results of a spilled array into another spilled array.

MartyCollins

New Member
Joined
Jan 21, 2022
Messages
38
Office Version
  1. 365
Platform
  1. Windows
Hi all,
So i have a table that I want to filter, thats fine.(formula in H9)

But i want the filtered results to feed into an adjacent formula spilling to the right (I9) which i also want to be dynamic but running into difficulty.
I can get it to work easily as per below non dynamic,but getting it dynamic has me in a spin - ive tried ByRow to feed it into filter, ive obviously tried simply replacing the =H9 with = H9# but getting nowhere there either..


Below is a basic idea of what im trying to achieve.
User selects a car... Optional extras are listed... and then the adjacent formula spills to the right listing all cars with same optional Extras eg Alloys;Aircon etc etc.

Formula I want to be dynamic...

=TRANSPOSE(
FILTER(TblData[Model],
TblData[Optional Extras]=H9))

Thanks,
Martin.


1660905446914.png
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Can you post your sample data.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
 
Upvote 0
Thanks Fluff- yes i have managed now to get that tool working-- V handy!!
So here it is again.

Book1
ABCDEFGHIJKLM
1
2Formula in H9Formula in I9 which I would like to be dynamic
3=FILTER( TblData[Optional Extras], TblData[Model]=H6)=TRANSPOSE( FILTER(TblData[Model], TblData[Optional Extras]=H9))
4
5Select Model
6Mondeo
7TblData
8Optional ExtrasAll Models with same extras
9MakeModelOptional ExtrasAlloysMondeoCamryFabia
10FordMondeoAlloysAirconMondeoFocus
11FordMondeoAirconSatnavMondeoPumaPrius
12FordMondeoSatnavHeated SeatsMondeoPumaLagunaMegane
13FordMondeoHeated Seats
14FordFocusAircon
15FordFocusHandsfee entry
16FordFocusBluetooth
17FordPumaHeated Seats
18FordPumaSatnav
19ToyotaCamryAlloys
20ToyotaCamryTowbar
21ToyotaCamryAutomatic Boot
22ToyotaCamryMetallic Paint
23ToyotaCamryRetracting Aerial
24ToyotaPriusHome Charger
25ToyotaPriusSatnav
26RenaultLagunaHeated Seats
27RenaultMeganeTowbar
28RenaultMeganeHeated Seats
29SkodaFabiaAlloys
30SkodaFabiaHeated Windscreen
31
Sheet1
Cell Formulas
RangeFormula
H3:I3H3=FORMULATEXT(H9)
H9:H12H9=FILTER( TblData[Optional Extras], TblData[Model]=H6)
I9:K9I9=TRANSPOSE( FILTER(TblData[Model], TblData[Optional Extras]=H9))
I10:J10,I12:L12,I11:K11I10=TRANSPOSE(FILTER(TblData[Model],TblData[Optional Extras]=H10))
Dynamic array formulas.
 
Upvote 0
Thanks for that how about
Fluff.xlsm
ABCDEFGHIJKLM
1
2
3
4
5Select Model
6Mondeo
7TblData
8Optional ExtrasAll Models with same extras
9MakeModelOptional ExtrasAlloysMondeoCamryFabia
10FordMondeoAlloysAirconMondeoFocus
11FordMondeoAirconSatnavMondeoPumaPrius
12FordMondeoSatnavHeated SeatsMondeoPumaLagunaMegane
13FordMondeoHeated Seats
14FordFocusAircon
15FordFocusHandsfee entry
16FordFocusBluetooth
17FordPumaHeated Seats
18FordPumaSatnav
19ToyotaCamryAlloys
20ToyotaCamryTowbar
21ToyotaCamryAutomatic Boot
22ToyotaCamryMetallic Paint
23ToyotaCamryRetracting Aerial
24ToyotaPriusHome Charger
25ToyotaPriusSatnav
26RenaultLagunaHeated Seats
27RenaultMeganeTowbar
28RenaultMeganeHeated Seats
29SkodaFabiaAlloys
30SkodaFabiaHeated Windscreen
Report
Cell Formulas
RangeFormula
H9:H12H9=FILTER( TblData[Optional Extras], TblData[Model]=H6)
I9:L12I9=LET(a,MAX(COUNTIFS(TblData[Optional Extras],H9#)),b,BYROW(H9#,LAMBDA(br,TEXTJOIN("|",,FILTER(TblData[Model],TblData[Optional Extras]=br)))),TRIM(MID(SUBSTITUTE(b,"|",REPT(" ",100)),SEQUENCE(,a,,100),100)))
Dynamic array formulas.
 
Upvote 0
Solution
Wow -- thanks a Lot!!
I had come across a similar problem and the solution had textjoin in there to "Square the array" (thats proabably a poor explanation!)
Im going to have to take some time to study that formula!!
Thanks again,
Martin.
 
Upvote 0

Forum statistics

Threads
1,214,912
Messages
6,122,200
Members
449,072
Latest member
DW Draft

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