tanyaleblanc
Board Regular
- Joined
- Mar 16, 2019
- Messages
- 145
I'm trying to say; if the word payout is in column c, delete contents from column b. I"m getting an error message @ If (Not Intersect(Target, Rows(3)) Is Payout) And (Target.Count = 3) Then
Sub Filter1()
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 Windows("Rental Rec.xlsm")
Sheets("Owned").Select
With Range("a2:bh" & lRow)
.AutoFilter
.AutoFilter field:=2, Criteria1:="<>#N/A"
.AutoFilter field:=3, Criteria1:="Payout"
End With
End With
'trying to say; if payout is in column c, delete contents from column b
' .Range("b3:b" & lrow).Value = "delete"
If (Not Intersect(Target, Rows(3)) Is Payout) And (Target.Count = 3) Then
Range("b3:b" & lRow).ClearContents
End If
Sub Filter1()
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 Windows("Rental Rec.xlsm")
Sheets("Owned").Select
With Range("a2:bh" & lRow)
.AutoFilter
.AutoFilter field:=2, Criteria1:="<>#N/A"
.AutoFilter field:=3, Criteria1:="Payout"
End With
End With
'trying to say; if payout is in column c, delete contents from column b
' .Range("b3:b" & lrow).Value = "delete"
If (Not Intersect(Target, Rows(3)) Is Payout) And (Target.Count = 3) Then
Range("b3:b" & lRow).ClearContents
End If