I have tried the following but nothing works.
Recording the steps yields
Range("A1").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
ActiveSheet.Range("$A$1:$D$338").RemoveDuplicates Columns:=Array(1, 2, 3, 4), Header:=xlYes
However, actually running the macro I get an error (5) on the last line, "invalid procedure call or argument".
I have tried
Range("$A$1:$D$338").Select
Selection.RemoveDuplicates Columns:=Array(1, 2, 3, 4), Header:=xlYes
and just
Range("$A$1:$D$338").RemoveDuplicates Columns:=Array(1, 2, 3, 4), Header:=xlYes
and a couple of minor variations I have seen online line but everything creates the same error. What am I missing?
Windows 10, MS Excel 365
Recording the steps yields
Range("A1").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
ActiveSheet.Range("$A$1:$D$338").RemoveDuplicates Columns:=Array(1, 2, 3, 4), Header:=xlYes
However, actually running the macro I get an error (5) on the last line, "invalid procedure call or argument".
I have tried
Range("$A$1:$D$338").Select
Selection.RemoveDuplicates Columns:=Array(1, 2, 3, 4), Header:=xlYes
and just
Range("$A$1:$D$338").RemoveDuplicates Columns:=Array(1, 2, 3, 4), Header:=xlYes
and a couple of minor variations I have seen online line but everything creates the same error. What am I missing?
Windows 10, MS Excel 365