ArtofExcel
New Member
- Joined
- Jul 5, 2016
- Messages
- 17
I'm looking to make a summary sheet for specific information that would be pulled from multiple sheets in the workbook. These sheets are created from the following macro
Sub Update_Names()
Do While Worksheets.Count > 6 'Clears old sheets (first 6 sheets stay)
Application.DisplayAlerts = False
Worksheets(7).Delete
Application.DisplayAlerts = True
Loop
Dim MyCell As Range, MyRange As Range 'repopulates sheets bases of list in "Names"
Set MyRange = Sheets("Names").Range("F4") 'List starts in F4 of current sheet
Set MyRange = Range(MyRange, MyRange.End(xlDown))
For Each MyCell In MyRange
Sheets.Add after:=Sheets(Sheets.Count) 'creates a new worksheet
Worksheets("Template").Cells.Copy ActiveSheet.Range("A1") 'Copies template for each name
Sheets(Sheets.Count).Name = MyCell.Value ' renames the new worksheet
Next MyCell
End Sub
I want to use the same list that starts in F4 to pull data from each sheet that this macro creates and pull it into a summary page, notice the length of the list is variable, the "names" group is defined using an offset function that allows for it to be any length to allow all names to have a page created for them with no extras ect. Ideally the summary would input into a table format table I could pull in that had name, data 1, data 2, ect. I've played with versions of indirect and whatnot but defining the sheets based on the names in the list "names" is holding me up here. Thanks in advance for any help you can give.
Sub Update_Names()
Do While Worksheets.Count > 6 'Clears old sheets (first 6 sheets stay)
Application.DisplayAlerts = False
Worksheets(7).Delete
Application.DisplayAlerts = True
Loop
Dim MyCell As Range, MyRange As Range 'repopulates sheets bases of list in "Names"
Set MyRange = Sheets("Names").Range("F4") 'List starts in F4 of current sheet
Set MyRange = Range(MyRange, MyRange.End(xlDown))
For Each MyCell In MyRange
Sheets.Add after:=Sheets(Sheets.Count) 'creates a new worksheet
Worksheets("Template").Cells.Copy ActiveSheet.Range("A1") 'Copies template for each name
Sheets(Sheets.Count).Name = MyCell.Value ' renames the new worksheet
Next MyCell
End Sub
I want to use the same list that starts in F4 to pull data from each sheet that this macro creates and pull it into a summary page, notice the length of the list is variable, the "names" group is defined using an offset function that allows for it to be any length to allow all names to have a page created for them with no extras ect. Ideally the summary would input into a table format table I could pull in that had name, data 1, data 2, ect. I've played with versions of indirect and whatnot but defining the sheets based on the names in the list "names" is holding me up here. Thanks in advance for any help you can give.