Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sounds easy enough. Assuming your data is something like:
(col a) (col b) Header1 values a 73 b 84 c 31 a 14 b 24 b 88 c 46 c 89 b 22 d 67 d 48 c 75 d 67 a 64 d 92 then this: Sub test() Cells.Sort _ key1:=Range("A2"), Order1:=xlAscending, _ Header:=xlYes, _ OrderCustom:=1, _ MatchCase:=False, _ Orientation:=xlTopToBottom, _ DataOption1:=xlSortNormal Cells.Subtotal _ GroupBy:=1, _ Function:=xlSum, _ TotalList:=Array(2), _ Replace:=True, _ PageBreaks:=False, _ SummaryBelowData:=True End Sub would produce: Header1 header2 a 73 a 14 a 64 a Total 151 b 84 b 24 b 88 b 22 b Total 218 c 31 c 46 c 89 c 75 c Total 241 d 67 d 48 d 67 d 92 d Total 274 Grand Total 884 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Hyperlink and Filter Data in Multiple Sheets | Excel Discussion (Misc queries) | |||
macro to find data and filter it and copy to another worksheet | Excel Programming | |||
Creating a macro to filter data on multiple sheets | Excel Programming | |||
Macro to Filter Information in Multiple sheets and Make graph | Excel Worksheet Functions | |||
Combine multiple sheets of data into one worksheet | Excel Discussion (Misc queries) |