Is there a way to dynamically create named ranges?
I have a worksheet created from a query that I can filter
and subtotal such as:
what I then want to do is create named ranges for each subgroup (in this case the Test that was taken). The reason I need the named ranges is to copy the data into a defined template location in another worksheet for the final layout.
I would also like to turn this code into a loop so that it will automatically go through and re-filter and re-subtotal for each gradelevel (3-10) and I would end up with named ranges for each test within each grade level.
Thanks for your help!
Lynette
I have a worksheet created from a query that I can filter
and subtotal such as:
Code:
Workbooks.Open Filename:=vTmpASO
Selection.AutoFilter
Selection.AutoFilter Field:=1, Criteria1:=vGLevel
Selection.Subtotal GroupBy:=2, Function:=xlSum, TotalList:=Array(9), _
Replace:=True, PageBreaks:=False, SummaryBelowData:=True
I would also like to turn this code into a loop so that it will automatically go through and re-filter and re-subtotal for each gradelevel (3-10) and I would end up with named ranges for each test within each grade level.
Thanks for your help!
Lynette