Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Subtotal Column Labels error

I get the following when the below code tries to subtotal table 7:
"Microsoft Office Excel cannot determine which row in your list or selection
contains column labels, which are required for this command."

The only difference I can see on table 7 is that it has four columns where
the rest have five or more. Is there someway to tell subtotal which to use
without the manual interaction?

Thanks

If tble = 2 Or tble = 4 Or tble = 6 Or tble = 7 Then
RptEnd = 7
Do Until Range("D" & RptEnd) = ""
RptEnd = RptEnd + 1
Loop
RptEnd = RptEnd - 1
For i = 7 To RptEnd
If Range("A" & i) = "" Then
Range("A" & i) = Range("A" & i - 1)
Else
End If
Next i

Range("A6:O" & RptEnd).Select
Application.CutCopyMode = False
Selection.Subtotal GroupBy:=1, Function:=xlSum, TotalList:=Array(4), _
Replace:=True, PageBreaks:=False, SummaryBelowData:=True
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Row labels displayed as column labels I Teach Excel Discussion (Misc queries) 0 January 27th 10 04:41 PM
Sumproduct Subtotal #Value! error Graham Excel Worksheet Functions 2 February 20th 09 02:46 PM
Subtotal Error Neutron1871 Excel Worksheet Functions 1 May 6th 06 02:36 AM
vlookup error with subtotal El Bee Excel Worksheet Functions 0 January 25th 06 06:00 PM
SubTotal Labels SharonInGa[_2_] Excel Programming 1 March 8th 05 10:41 PM


All times are GMT +1. The time now is 01:27 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"