+ Reply to Thread
Results 1 to 3 of 3

Find Duplicates using VBA

Hybrid View

  1. #1
    Registered User
    Join Date
    11-14-2011
    Location
    Vancouver
    MS-Off Ver
    Excel 2003
    Posts
    2

    Find Duplicates using VBA

    Hi everyone,

    I'm in IT class and my task is to find duplicates in a set of data using VBA in Excel. For simplicity's sake, I have five entries in column A, like so:

    A
    B
    C
    A
    D

    I would like to loop through this set of data to locate the duplicates. My teacher has hinted that I should compare the process in real life, where if we were to find duplicates in this set of data, for example, I would first look at A, and look through the rest of the data in the column to see if there are any duplicates. Then I would move on to B, and go through the column again to see if there are duplicates, and so on. Everytime I move onto a new letter though, I technically only need to look at the letters that follow it to check for duplicates (because I've already checked the ones before it previously).

    I would like to have the text "SAME" show up in the cell next to the duplicates (in the next column).

    Following this logic, how do I set my variables and come up with a VBA code to complete this task?

    Many thanks!
    Last edited by smooshiz; 11-14-2011 at 03:18 PM.

  2. #2
    Registered User
    Join Date
    11-14-2011
    Location
    Vancouver
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Find Duplicates using VBA

    Never mind. I solved it myself x)

  3. #3
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,351

    Re: Find Duplicates using VBA

    Hey smooshiz,

    What grade do I get for the attached? There are other ways to get this answer also.
    Attached Files Attached Files
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1