Code:
Workbooks.Open ("X:\MyFile.xlsx")
Worksheets("Sheet1").Activate
Range("A1").CurrentRegion.Select
Selection.Subtotal GroupBy:=1, Function:=xlSum, TotalList:=Array(5, 6, 7)
above code working fine just want to know, is there any way I can assign or customized summary text in subtotal.?
for instance the above code only gives the value of columns 5, 6, 7 but I want it to display like below..
Column 5 | Column 6 | Column 7 |
1 | 2 | 1 |
2 | 3 | 5 |
3 Products Entered | 5 DeCertifications | 6 Edits |
<tbody>
</tbody>
I tried the below line but its not working.
Code:
Selection.Subtotal GroupBy:=1, Function:=xlSum, TotalList:=Array(5 & " products entered", 6 & " DeCetifications", 7 & " Edits)
Any way to workaround..???