+ Reply to Thread
Results 1 to 2 of 2

Excel 2007 : excel macro for selecting duplicates, then ranking them based on the number of dupes

  1. #1
    Registered User
    Join Date
    03-22-2011
    Location
    Yarmouth, Canada
    MS-Off Ver
    Excel 2003
    Posts
    1

    excel macro for selecting duplicates, then ranking them based on the number of dupes

    Hello,

    I've been reading many excel forums for the past few days trying to figure out how to complete a macro I've been working on, and I would love some pointers as to what my next step should be.

    What I am looking to do is the following:

    I'd like to create a macro that examines the spreadsheet, determing which are "duplicates" but instead of removing them, I'd like to label them based on how many duplicates there are.

    For example; if there no duplicates, I'd like it to return 1 in the next column. If there is a duplicate below it, instead of returning 2, I'd like it to return 1 as well. However, in the next row if there is another duplicate (i.e. a third one) I'd like it to return 2, past that if there's yet another duplicate below (i.e. a fourth one) I'd like it to return 3, and so forth.

    Basically I'm looking for a way to create a macro allowing me to return 1 for single or only double duplicates, but anything past 2 of the same record type, return 2,3,4, etc.

    *update*

    I should clarify in my help request post, I'm looking for a return like this:

    abc;purchasing;denver;CO ---- 1
    abc;purchasing;denver;CO ---- 1
    abc;purchasing;denver;CO ---- 2
    abc;purchasing;denver;CO ---- 3

    i.e. then I could sort out all of the "1's" knowing that there aren't more than "2" per depart/location so I can then use that list. If this doesn't clarify it well enough, please let me know!

    I've uploaded a sample document to show what I've already got in place (not the macro, but the formulas I recorded as a macro), and I am really hoping someone can help me finish the last step off.

    Any help would be greatly appreciated!!

    Cheers,
    Paul
    Attached Files Attached Files
    Last edited by Needzhelp; 03-23-2011 at 10:19 AM.

  2. #2
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: excel macro for selecting duplicates, then ranking them based on the number of du

    Hi Needzhelp
    One way in
    Q26
    Please Login or Register  to view this content.
    and fill up
    If the solution helped please donate to RSPCA

    Site worth visiting: Rabbitohs

+ 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