route217
asked on
Macro error - Cannot see mistake
Hi Experts using Excel 2013
I have the following macro which has started to error since i changed the column:=2 from 1 to 2 (run time error 1004) on line
Sheets("Unique List").Range("B:B").Remove Duplicates Columns:=2, Header:=xlYes....
cannot see the mistake..
I have the following macro which has started to error since i changed the column:=2 from 1 to 2 (run time error 1004) on line
Sheets("Unique List").Range("B:B").Remove
cannot see the mistake..
Sub CopyandPasteValues()
Application.ScreenUpdating = False
Sheets("Unique List").Columns(2).ClearContents
Sheets("Data").Range("DR:DR").SpecialCells(xlCellTypeConstants).Copy
Sheets("Unique List").Range("B1").PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False
Sheets("Unique List").Range("B:B").RemoveDuplicates Columns:=2, Header:=xlYes
Application.ScreenUpdating = True
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
It should be Columns:=1 not Columns:=2.
ASKER