Forum Discussion
kidusyohans
Apr 09, 2021Copper Contributor
vba
I am trying to delete column C for words with "ongoing" i keep getting range of object worksheet failed error Sub Delete_Rows_Based_On_Value() Dim ws As Worksheet Dim lRow As Long Set ws = ...
kidusyohans
Apr 09, 2021Copper Contributor
JMB17 looks like the error is on ws.Range("A1:A" & 1Row).AutoFilter Field:=3, Criteria1:="ongoing"
JMB17
Apr 09, 2021Bronze Contributor
I overlooked the field number. You will need to double check your autofilter range and field number as there is no field 3 if the autofilter range is only Column A. So, the autofilter range will need to be "A1:C" & lRow or the field number should be 1.