Hi all,
I have the following which is in a macro for a Filter.
Is it possible to change the D1000, in the formula to point to the last row in Column D?
Just before the ws.Range I have
I have tried
and I get a “Runtime error 1004, Method ‘Range’ of object_Worksheet failed.
I have the following which is in a macro for a Filter.
VBA Code:
ws.Range("D4:D1000 ").AutoFilter Field:=4, Criteria1:=""
Just before the ws.Range I have
VBA Code:
LastRow = ws.Range("D" & Rows.Count).End(xlUp).Row
I have tried
VBA Code:
ws.Range("D4:D&LastRow").AutoFilter Field:=4, Criteria1:=""