tanyaleblanc
Board Regular
- Joined
- Mar 16, 2019
- Messages
- 145
trying to say; if the word cancelled in column b, enter yes in column ab
Sub Filter()
Dim lRow As Long
Dim ts As Date
If AutoFilterMode = True And FilterMode = True Then ActiveSheet.ShowAllData
lRow = ActiveSheet.Range("A30000").End(xlUp).Row
With Workbooks("Rental Rec.xlsm")
With .Sheets("Owned")
If .AutoFilterMode And .FilterMode Then .ShowAllData
lRow = .Range("A30000").End(xlUp).Row
With .Range("a1:bh" & lRow)
.AutoFilter Field:=2, Criteria1:="<>#N/A"
.AutoFilter Field:=3, Criteria1:="Payout"
End With
.AutoFilter.Range.Offset(1).Columns(2).ClearContents
End With
End With
.Range("ab3:ab" & lRow).Value = "Yes"
Sub Filter()
Dim lRow As Long
Dim ts As Date
If AutoFilterMode = True And FilterMode = True Then ActiveSheet.ShowAllData
lRow = ActiveSheet.Range("A30000").End(xlUp).Row
With Workbooks("Rental Rec.xlsm")
With .Sheets("Owned")
If .AutoFilterMode And .FilterMode Then .ShowAllData
lRow = .Range("A30000").End(xlUp).Row
With .Range("a1:bh" & lRow)
.AutoFilter Field:=2, Criteria1:="<>#N/A"
.AutoFilter Field:=3, Criteria1:="Payout"
End With
.AutoFilter.Range.Offset(1).Columns(2).ClearContents
End With
End With
.Range("ab3:ab" & lRow).Value = "Yes"