Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
HI there,
I'm trying to apply an autofilter to each sheet in my workbook to copy data to a summary sheet based on criteria. I keep getting an error on 'sh.Range("Status").AutoFilter , "Open"' Can anyone help? For Each sh In ThisWorkbook.Worksheets If sh.Name < DestSh.Name Then sh.AutoFilterMode = False sh.Range("Status").AutoFilter , "Open" Last = LastRow(DestSh) shLast = LastRow(sh) 'Copy range and paste into Summary as values With sh.Range("D2:H2", sh.Cells(sh.Rows.Count, "D").End(xlUp)) DestSh.Cells(Last + 1, "B").Resize(.Rows.Count, _ .Columns.Count).Value = .Value End With 'Copy sheet name to Summary column A DestSh.Cells(Last + 1, "A").Value = sh.Name End If Next Thanks |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro to Filter on active cell within autofilter | Excel Programming | |||
I need to sort an active sheet using the col of the active cell | Excel Programming | |||
Copy from active sheet and paste into new sheet using info from cell in active | Excel Programming | |||
autofilter on a not-active sheet | Excel Programming | |||
How to count rows in a user-defined AutoFilter or AdvancedFilter is active? | Excel Programming |