Remove/Clear Duplicate Cells

  • Hi Folks


    I wonder if anyone can point me in the right direction. I have a workbook with 12 sheets, 1 for each month of the year. Each month has around 30,000 user IDs on it (this is a log of each time a user logs into our website).
    What I need to do is find out how many unique users have logged into our site for the whole year, or in other words, remove duplicate user ids accross the workbook.
    I realise that this will probably destroy my processor, so was wondering the best way to do it?
    I also have all this information in ONE spreadsheet if it would be easier? I just copied and pasted each month into a column (Jan is column A, feb in B, mar in C etc)


    I ran some code on this sheet to remove dupllicates from column A:E but this was taking AGES!


    Thanks in advance for any help


    Jamie

  • Re: Remove Duplicates


    Hi Jamie, thats a lot of data, no wonder it was taking ages!!!


    ::D


    Personally, I would put all the data into one sheet like you did (Columns A:L) and use a Pivot table. Let the Pivot do the work for you.


    Running code on that number of Rows will be a headache, but there are quick-ish ways to do it. Can you post the code that you currently have?


    Ger

    _______________________________________________
    There are 10 types of people in the world. Those that understand Binary and those that dont. :P


    Why are Halloween and Christmas the same? Because Oct 31 = Dec 25... ;)

    _______________________________________________

  • Re: Remove Duplicates


    Hi Jamie, I had a similar problem and found using the Advance filter option and putting the results into a different area works for me

  • Re: Remove Duplicates


    Hi Ger


    Thanks for your reply. The code I have was from ozgrid search, remove duplicates. here it is:




    I may have a look at pivot tables, thanks

  • Re: Remove Duplicates


    Hi Jamie, I just a quick look at Pivot tables and I dont know if they will create the effect you are looking for....


    Assume for a second your data is in 12 columens on one sheet.


    I used this code below just now on 65,000 rows of Data x 12 columns wide and it took about 45 seconds to extract all unique records in 12 equivalent columns on Sheet 2. It uses advanced filter.


    Assumes your data starts in A1.


    Hopefully this will get you started.


    HTH
    Ger


    EDIT: I would add that I just re-run this code with the same number of rows and Columns with less random data (which increased the number of duplicates dramatically) and it completed the task in about 2 seconds.... so the more duplicates you have, the quicker it will work.

    _______________________________________________
    There are 10 types of people in the world. Those that understand Binary and those that dont. :P


    Why are Halloween and Christmas the same? Because Oct 31 = Dec 25... ;)

    _______________________________________________

  • Re: Remove/Clear Duplicate Cells


    Hi Ger


    I will run this when I get to work and let you know how I get on.
    Thank you for your input


    Jamie[hr]*[/hr] Auto Merged Post Until 24 Hrs Passes;[dl]*[/dl]Hi Ger


    The code run very quickly (1 minute exactly) however its not working as expected.
    The code returned around 25,000 unique ids (cant remember exact figure) however I know this is incorrect because;


    each column is a unique list, i.e there is no repeat of a user id in the same column. Each column averages around 35,000 user IDs so I would expect this to be the lowest figure returned from the code. To clarify, each column represents the Unique IDs logged in for that month.


    Thanks
    Jamie[hr]*[/hr] Auto Merged Post Until 24 Hrs Passes;[dl]*[/dl]Hi Ger

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!