• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

How to do this using VBA?

sasuke

Member
Someone help me on how to create this program using vba. thanks :)
______________________________________________________________
Mod edit : thread moved to appropriate forum !
 

Attachments

  • HelpMe.xlsx
    8.6 KB · Views: 11
Hi Sasuke, My name is Naruto ..... Just kidding.
Why do you need VBA when remove duplicates is built in Excel 2010?
An easy way is to turn on the macro recorder and carry out the actions and it will give you the code.
Here's a link where you will be able to find several examples that you can choose from to fit your needs:

http://www.amarindaz.com/excel-vba-remove-duplicates/

Hope this help!

-K-
 
sasuke,

Try
Code:
Sub test()
    Dim r As Range
    Sheets("sheet1").Columns("a:b").Copy Sheets("sheet2").Cells(1)
    For Each r In Sheets("sheet2").Columns("b").SpecialCells(2).Areas
        r.RemoveDuplicates 1, 2
    Next
End Sub
 
Back
Top