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").RemoveDuplicates Columns:=2, Header:=xlYes....

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

Open in new window

route217Asked:
Who is Participating?
 
Guy Hengel [angelIII / a3]Connect With a Mentor Billing EngineerCommented:
0
 
route217Author Commented:
Hi expert...still errors..
0
 
Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
It should be Columns:=1 not Columns:=2.
0
All Courses

From novice to tech pro — start learning today.