List items according to an attribute

cicco_71

New Member
Joined
Jul 20, 2018
Messages
7
Office Version
  1. 2016
Platform
  1. Windows
Dear Mr. and Mrs. Excels,

I'm looking for a solution for the following problem:

I have a huge list (28 000 rows) of items (practically document subchapter titles) that are connected to their parent items (main chapters) as follows:

Chapter titleSubchapter titleStaring page no.
1.1 Cooking fish1.1.1 Bass5
1.1 Cooking fish1.1.2 Salmon12
1.1 Cooking fish1.1.3 Catfish50
1.1 Cooking fish1.1.4 Hake61
1.2 Steaming fish1.2.1 Trout75
1.2 Steaming fish1.2.2 Salmon32
and so on...

I need to make a function (I guess VBA?) that takes "1.1 Cooking fish" as input (for example in cell A1) and fills the range A2:B999 with the corresponding subchapters and their page numbers.

How do I start?...

Thank you very much!
 
Try it like
VBA Code:
      For i = 0 To .Count - 1
         Sheets("Template").Copy , Sheets(Sheets.Count)
         ActiveSheet.Name = .items()(i)
         Ws.Range("A1").AutoFilter 1, .keys()(i)
         Ws.AutoFilter.Range.Columns("B:C").Copy Range("B11")
      Next i
 
Upvote 0

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.

Forum statistics

Threads
1,214,911
Messages
6,122,199
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