dpaton05
Well-known Member
- Joined
- Aug 14, 2018
- Messages
- 2,352
- Office Version
- 365
- 2016
- Platform
- Windows
I have some code that filters rows and if there is nothing found by the filter, it skips to the next sheet. How do I make this line of code
refer to the next filtered, visible row as at the moment, it looks at the next row, filtered or not?
I get a type mismatch with this
VBA Code:
If ws.[A3].Cells.Offset(1, 0) = "" Then
VBA Code:
For Each ws In Worksheets
If ws.Name <> "Cancellations" And ws.Name <> "Totals" And ws.Name <> "Sheet2" Then
With ws.[A3].CurrentRegion
.AutoFilter 1, Dt ' autofilter for the value in cell [B27]
.AutoFilter 3, Req ' autofilter for the value in cell [B25]
'Check to see if the date cell, column A, for a job has anything in it. If it doesn't, turn the autofilter off and skip to the next sheet.
If ws.[A3].Cells.Offset(1, 0) = "" Then
.AutoFilter
GoTo SkipSheet
End If
I get a type mismatch with this
VBA Code:
If ws.[A3].Cells.Offset(1, 0).SpecialCells(xlCellTypeVisible) = "" Then
Last edited: