VBA Macro Code To Delete Duplicates Between 2 Sheets

  • Hello,


    I have this macro that finds the duplicates on sheet2 and sheet3 (Master list), then deletes the duplicates on sheet2.


    However, as of late, I am getting an "Out of range" error on this macro. The columns that it references are D, E and F.


    If anyone could take a look at this code and see if i could have done something in error, it would be greatly appreciated!


    Thank you.



  • Re: VBA Macro Code To Delete Duplicates Between 2 Sheets


    Hi


    [vb]MsgBox Sheets(2).Range("b2").CurrentRegion.Columns.Count
    MsgBox Sheets("Master Tracking").Range("b2").CurrentRegion.Columns.Count[/vb]


    both the count should return at least 6. If not, check your range.