Chirag R Raval
Member
Dear Sir,
I have below code for simply subtotal on various columns but fails after 30th column.
Data have total 65 columns , there are many columns require to subtotal but at the end of continues series at 30th column (though require or not required subtotal) , may be on 31st column Out Of Memory Error displayed
Code
hope there are some solution found here that can subtotal on any number of columns in one shot.
Regards,
Chirag Raval
I have below code for simply subtotal on various columns but fails after 30th column.
Data have total 65 columns , there are many columns require to subtotal but at the end of continues series at 30th column (though require or not required subtotal) , may be on 31st column Out Of Memory Error displayed
Code
Code:
Sub SobTotRequ()
With ActiveSheet
.Range("A1:BL" & LastRow).Select
With Selection
.SUBTOTAL GroupBy:=2, Function:=xlSum, TotalList:=Array(14, 15, 19, 20, 21, 22, 23, 24, 27, 28, 29, 30, 32, 33, 34, 40, 41, 42, 43, 44, 45, 46), _
Replace:=False, pagebreaks:=False, SummaryBelowData:=True
ActiveSheet.Outline.ShowLevels RowLevels:=3
End With
End With
End Sub
hope there are some solution found here that can subtotal on any number of columns in one shot.
Regards,
Chirag Raval