I am fairly new to the forum and want to thank all in advance for help - this is a great service. Here is my problem:
My debugger highlights in yellow the following code (obviously indicating a probelm when trying to create subtotals from a sheet that has variable row length:
'adds subtotals to data sorted above
NumberOfRows = Range("A65536").End(xlUp).Row
Range("AD1:BA" & NumberOfRows).Select
Selection.Subtotal GroupBy:=2, Function:=xlSum, TotalList:=Array(24), _
Replace:=True, PageBreaks:=False, SummaryBelowData:=True
Starting at "Selection: everything is yellow and the program stops. Anything obvious you can see?
Thanks again...in advance
Bookmarks