Hi All,
I have a question. So I am trying to make a VBA with filters. If the result met the condition, it shows YES. If the result doesn't meet the condition, it shows NO.
The next step that I'm confuse is, if all the results are showing as NO, then I want it to Exit the Sub. But if there's any YES, I want it to filter all the result that was showing YES.
Could you please help?
Also, here's the VBA code, I've made only until the filter mode.
Thank you!
I have a question. So I am trying to make a VBA with filters. If the result met the condition, it shows YES. If the result doesn't meet the condition, it shows NO.
The next step that I'm confuse is, if all the results are showing as NO, then I want it to Exit the Sub. But if there's any YES, I want it to filter all the result that was showing YES.
Could you please help?
Also, here's the VBA code, I've made only until the filter mode.
VBA Code:
ThisWorkbook.Sheets("WHT ID").Range("$AW$2").FormulaR1C1 = "=IF(OR(R[23]C[-28]=""0088220300"",R[23]C[-28]=""0088320100"",R[23]C[-28]=""0088110600""),""YES"",""NO"")"
ThisWorkbook.Sheets("WHT ID").Range("$AW$2").AutoFill Destination:=Range("$AW$2:$AW" & Range("$B" & Rows.Count).End(xlUp).Row)
ThisWorkbook.Sheets("WHT ID").Range("A:AW").EntireColumn.AutoFit
ThisWorkbook.Sheets("WHT ID").Range("A1:AW1").autofilter