Hello,

I recorded a macro for auto filter. But I wonder how to ensure it so it can capture dynamic range. Like in below code, isnt it it is only taking A5 to IZ 50? How can I make VBA to select all data?

Rows("5:5").Select
     Selection.AutoFilter
    ActiveSheet.Range("$A$5:$IZ$50").AutoFilter Field:=15, Criteria1:="<>#N/A" _
        , Operator:=xlAnd

Note: I want to autofilter column O values with condition as <> #N/A.

Thanks