sub asdfg
Dim asdfg As Range
Dim iLastRow As Long
iLastRow = ws.Cells(Rows.Count, "B").End(xlUp).Row
Set asdfg = Range("$A$3:$U$" & iLastRow)
' if macro found in filtr "looking_for_record_in_this_case" then i need to check if exist any record
' if not exist then skip those statement and move to next statement if/else
If asdfg.AutoFilter(field:=9, Criteria1:="looking_for_record_in_this_case") = True Then
asdfg.AutoFilter field:=20, Criteria1:="="
asdfg.AutoFilter field:=9, Criteria1:="looking_for_record_in_this_case"
Exit Sub
MsgBox "Not found", vbCritical, "error"
'Exit Sub
Else
If asdfg = False Then
'asdfg.ShowAllData
asdfg.AutoFilter field:=20, Criteria1:="="
MsgBox "I'm not found any record in filtr on column 9 - looking_for_record_in_this_case!! - and it filtred by only column 20"
End If
End If
end sub