Subtotal problem; Asks for label row.
Posted by Beginner Box on March 08, 2001 2:25 PM
Me again,
I have the following section of code for subtotalling info in a sheet:
On Error Resume Next
Set ND = WS.Range("A65536").End(xlUp).Offset(0, 15)
Range("A3", ND).Select
Selection.Subtotal GroupBy:=1, Function:=xlSum, TotalList:=Array(4, 5, 6, 7, _
8, 10, 11, 13, 15), Replace:=True, PageBreaks:=False, SummaryBelowData:= _
True
The problem is, it notifies me every time that it can't find the row labels, and press OK if the first row in selected range includes them. I press OK and it subtotals correctly. How do I tell it to use the first row every time so I won't see this box? Thanks for any help in advance.