Generate a table from a "nested list" (do not use VBA)

tomas saiz

New Member
Joined
Mar 12, 2024
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Book1.xlsx
ABCDEFGHIJ
1
2StructureStructureWallmaterial 1
3WallStructureWallmaterial 2
4material 1StructureWallmaterial 3
5material 2StructureWallmaterial 4
6material 3StructureFloormaterial 5
7material 4StructureFloormaterial 6
8StructureCeilingmaterial 7
9FloorElectronicsSensorsSensor 1
10material 5ElectronicsSensorsSensor 2
11material 6ElectronicsCablesCable 1
12ElectronicsCablesCable 2
13CeilingElectronicsCablesCable 3
14material 7
15
16Electronics
17Sensors
18Sensor 1
19Sensor 2
20
21Cables
22Cable 1
23Cable 2
24Cable 3
25
Sheet1


I want to use the data on the "nested list" on columns B, C and D, and use some clever formulas to automatically generate the table on columns G, H, I. What do you suggest?

(I know that "nested list" is not right term, but I could not think anything better)
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Here is one idea:
MrExcel_20240311.xlsx
ABCDEFGH
1
2StructureStructureWallmaterial 1
3WallStructureWallmaterial 2
4material 1StructureWallmaterial 3
5material 2StructureWallmaterial 4
6material 3StructureFloormaterial 5
7material 4StructureFloormaterial 6
8StructureCeilingmaterial 7
9FloorElectronicsSensorsSensor 1
10material 5ElectronicsSensorsSensor 2
11material 6ElectronicsCablesCable 1
12ElectronicsCablesCable 2
13CeilingElectronicsCablesCable 3
14material 7
15
16Electronics
17Sensors
18Sensor 1
19Sensor 2
20
21Cables
22Cable 1
23Cable 2
24Cable 3
Sheet8
Cell Formulas
RangeFormula
F2:H13F2=LET(b,B2:B24,c,C2:C24,d,D2:D24, bf,LOOKUP(SEQUENCE(ROWS(b)),FILTER(SEQUENCE(ROWS(b)),b<>""),FILTER(b,b<>"")), cf,LOOKUP(SEQUENCE(ROWS(c)),FILTER(SEQUENCE(ROWS(c)),c<>""),FILTER(c,c<>"")), fdwn,HSTACK(bf,cf,d), FILTER(fdwn,INDEX(fdwn,,3)<>0))
Dynamic array formulas.
 
Upvote 0
Here one more

Excel Formula:
=LET(t,HSTACK(B2:B23,DROP(C2:C24,1),DROP(D2:D25,2)),TRANSPOSE(SCAN("",TRANSPOSE(FILTER(t,INDEX(t,,3)<>0)),LAMBDA(a,b,IF(b<>0,b,a)))))
 
Upvote 0
Another option
Fluff.xlsm
ABCDEFGH
1
2StructureStructureWallmaterial 1
3WallStructureWallmaterial 2
4material 1StructureWallmaterial 3
5material 2StructureWallmaterial 4
6material 3StructureFloormaterial 5
7material 4StructureFloormaterial 6
8StructureCeilingmaterial 7
9FloorElectronicsSensorsSensor 1
10material 5ElectronicsSensorsSensor 2
11material 6ElectronicsCablesCable 1
12ElectronicsCablesCable 2
13CeilingElectronicsCablesCable 3
14material 7
15
16Electronics
17Sensors
18Sensor 1
19Sensor 2
20
21Cables
22Cable 1
23Cable 2
24Cable 3
25
Sheet6
Cell Formulas
RangeFormula
F2:H13F2=LET(x,SCAN(,B2:B100,LAMBDA(a,b,IF(b="",a,b))),y,SCAN(,C2:C100,LAMBDA(a,b,IF(b="",a,b))),z,HSTACK(x,y,D2:D100),FILTER(z,INDEX(z,,3)<>""))
Dynamic array formulas.
 
Upvote 0
Solution

Forum statistics

Threads
1,215,136
Messages
6,123,246
Members
449,093
Latest member
Vincent Khandagale

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