I've got a table, and in Column J, starting from J3 going downwards, I'd like to filter out all the values which are #DIV/0!
I tried recording a macro and this is what came up below, but the end of the table (J1050) sometimes changes (could be more or less), and also it seems to be including all the values in the table, instead of filtering out #DIV/0!
Just for reference, the cell value in J3 going downwards is
How would I adjust the macro? Thanks!
I tried recording a macro and this is what came up below, but the end of the table (J1050) sometimes changes (could be more or less), and also it seems to be including all the values in the table, instead of filtering out #DIV/0!
Just for reference, the cell value in J3 going downwards is
Excel Formula:
=H3/D3
How would I adjust the macro? Thanks!
VBA Code:
Sub Macro1()
ActiveSheet.Range("$A$2:$L$1050").AutoFilter Field:=10, Criteria1:=Array( _
"0.01", "0.10", "0.11", "0.12", "0.14", "0.16", "0.20", "0.22", "0.24", "0.28", "0.30", _
"0.31", "0.33", "0.39", "0.40", "0.42", "0.47", "0.50", "0.52", "0.53", "0.54", "0.55", _
"0.65", "0.70", "0.72", "1.26", "1.43", "1.60", "1.61", "1.73", "1.77", "1.89", "1.91", _
"1.96", "10.06", "11.36", "15.76", "2.00", "2.04", "2.13", "2.25", "2.48", "2.84", "3.54" _
, "3.64", "30.17", "33.65", "4.16", "5.29", "5.42", "5.81", "6.21", "6.54", "7.38", "8.39" _
), Operator:=xlFilterValues
End Sub