Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am trying to filter on a column and then I want to sum the result of the
visible rows. How do I fo this in code? Thanks -- Jason V |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Great Question! Use Subtotal!!
Function Solution: http://www.contextures.com/xlFunctions01.html#Filter VBA Solution: http://www.mrexcel.com/archive/VBA/5209.html http://www.ozgrid.com/News/excel-subtotal-dynamic.htm HTH, Ryan--- "Jason V" wrote: I am trying to filter on a column and then I want to sum the result of the visible rows. How do I fo this in code? Thanks -- Jason V |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
try
MyTot = WorksheetFunction.Subtotal(109, Range("A2:A8")) Mike "Jason V" wrote in message ... I am trying to filter on a column and then I want to sum the result of the visible rows. How do I fo this in code? Thanks -- Jason V |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I should have added wher A2 :A8 is the unfiltered range
Mike "Mike H" wrote in message ... try MyTot = WorksheetFunction.Subtotal(109, Range("A2:A8")) Mike "Jason V" wrote in message ... I am trying to filter on a column and then I want to sum the result of the visible rows. How do I fo this in code? Thanks -- Jason V |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am still having trouble. Here is a sample spreadsheet
Green 2 Green 2 Blue 3 Red 4 Green 3 I want to filter on green and then sum the values (7) and then assign the sum to a variable. I do not know the unfiltered range because it will continue to grow. Do I select the whole column then? Thanks Jason V "Mike H" wrote: I should have added wher A2 :A8 is the unfiltered range Mike "Mike H" wrote in message ... try MyTot = WorksheetFunction.Subtotal(109, Range("A2:A8")) Mike "Jason V" wrote in message ... I am trying to filter on a column and then I want to sum the result of the visible rows. How do I fo this in code? Thanks -- Jason V |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Filtering | Excel Discussion (Misc queries) | |||
Filtering | Excel Discussion (Misc queries) | |||
Filtering | Excel Discussion (Misc queries) | |||
trouble filtering a list. Why isn't column filtering? | Excel Worksheet Functions | |||
Filtering | Excel Programming |