Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I have a basic macro to run the subtotal in Excel, but I need to use a "SUMIF" instead of the "SUM" function. I need to SUMIF the numbers in cells if they are greater than 0.01, or SUMs only the positive numbers and leave the negative out. Sub Subtotal() ' ' Subtotal Macro ' ' Range("A1").Select Selection.Subtotal GroupBy:=5, Function:=xlSum, TotalList:=Array(25, 26, 27 _ , 28, 53, 54, 57, 58, 59, 68, 69, 77, 78, 86, 87, 95, 96, 104, 105, 113, 114, 122, 123, 132, 133, 141, _ 142, 150, 151, 159, 160), Replace:=True, PageBreaks:=False, SummaryBelowData:= _ True End Sub Thanks Marc |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Sumif / subtotal / something else? | Excel Discussion (Misc queries) | |||
Subtotal and sumif help | Excel Discussion (Misc queries) | |||
subtotal and sumif | Excel Worksheet Functions | |||
Sumif & subtotal | Excel Discussion (Misc queries) | |||
Subtotal on SumIf | Excel Worksheet Functions |