Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a routine whereby I filter a range and then I want to select a
specific column down to the last row number, and then performa subtotal on it. When I run the code I get 385 rows. My range Calculation shows 425, the total number of rows on the sheet. Any Ideas? ================================================== == xlApp.Selection.AutoFilter xlApp.Selection.AutoFilter Field:=26, Criteria1:="False" xlApp.Selection.AutoFilter Field:=27, Criteria1:="False" xlApp.Selection.AutoFilter Field:=15, Criteria1:="<=" & Now() xlApp.Selection.AutoFilter Field:=22, Criteria1:=0 z = xlApp.ActiveSheet.AutoFilter.Range.Row - 1 + xlApp.ActiveSheet.AutoFilter.Range.Rows.Count Set xlRng = xlApp.Range(xlApp.Cells(4, 12), xlApp.Cells(z, 12)) xlApp.Selection.AutoFilter xlApp.Sheets("Top Sheet").Select xlApp.Range("a27").Formula = "Tasks Not Started" xlApp.Range("b27") = xlApp.WorksheetFunction.Subtotal(3, xlRng) |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Auto Filter - drop down (increase text size) | Excel Discussion (Misc queries) | |||
size limitations on auto filter | Excel Discussion (Misc queries) | |||
How a macro auto-determine unspecified range | Excel Programming | |||
How to determine a range size | Excel Programming | |||
In VB, get Auto Filter Range | Excel Programming |