Ark68
Well-known Member
- Joined
- Mar 23, 2004
- Messages
- 4,570
- Office Version
- 365
- 2016
- Platform
- Windows
So I found, and tried to adapt this code, that will step through the visible cells of a filtered worksheet to provide me with their row numbers.
It works, but it's including the header row in it's process. I only need the data rows below row 2.
If I try to reset the filter_rng set earlier from ws_data.range("A2:B" & lrow) to ws_data.range("A3:B" & lrow), I receive an "Object required" error with that line.
It works, but it's including the header row in it's process. I only need the data rows below row 2.
If I try to reset the filter_rng set earlier from ws_data.range("A2:B" & lrow) to ws_data.range("A3:B" & lrow), I receive an "Object required" error with that line.
Code:
With ws_data
'Set filter_rng = .Range("A3:B" & lrow)
For Each rw In filter_rng.SpecialCells(xlCellTypeVisible)
t = rw.Row
inqseg = "[" & Format(ws_sdata.Cells(t, 5), "00") & "]"
flrow = Application.WorksheetFunction.Match("end", .Columns(8), 0) - 1
For fdest = 9 To flrow
fdest8 = .Cells(fdest, 8)
If fdest8 = inqseq Then
.Cells(fdest, 8).Interior.Color = ccgreen
.Cells(fdest, 6).Font.Color = ccgreen
.Cells(fdest, 6).Locked = False
End If
Next fdest
Next rw
End With