+ Reply to Thread
Results 1 to 5 of 5

Code to prevent duplicate entries

  1. #1
    Forum Contributor pipoliveira's Avatar
    Join Date
    08-09-2012
    Location
    Ireland
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    368

    Code to prevent duplicate entries

    Dear All,

    I hope you are all well.

    In a nutshell, I have a Master Workbook and 4 Child ones.

    The Master has a CommandButton that collects all data from the Childs. No issues on that.

    Now I am trying to add a code that prevents duplication of entries, but none worked so far.

    The code on the Master to collect data from Childs is this one:
    Please Login or Register  to view this content.
    There are more codes similar to the above but I did not wanted to copy/paste all code.

    Any ideas on how to set a code to prevent duplication?

    Your assistance and/or advise will be highly appreciated.

    Best regards,
    Filipe

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Code to prevent duplicate entries

    a sample code
    Please Login or Register  to view this content.
    If solved remember to mark Thread as solved

  3. #3
    Forum Contributor pipoliveira's Avatar
    Join Date
    08-09-2012
    Location
    Ireland
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    368

    Re: Code to prevent duplicate entries

    That's it Patel,

    Graci / Thanks a million, really appreciated.

    Best regards,
    Filipe

  4. #4
    Forum Contributor pipoliveira's Avatar
    Join Date
    08-09-2012
    Location
    Ireland
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    368

    Re: Code to prevent duplicate entries

    Hi Patel,

    Sorry to bother you again with this matter.

    Your code worked perfectly for one sheet but I am using it for 3 of them.

    I don't know if it's the amount of code that I used or the range I want to delete the duplicates.

    For example, on your code, you have:
    Please Login or Register  to view this content.
    On mine, and due to the possible entries, I had to set the range as:
    Please Login or Register  to view this content.
    I am having an "Run Rime Error '28': Out of stack space"

    Is there another code that can overcome the above mentioned error or is there another code that I can add on the code that I first posted instead on the "Worksheet_Change" event?

    Your assistance on this matter will be highly appreciated.

    Best regards,
    Filipe

  5. #5
    Forum Contributor pipoliveira's Avatar
    Join Date
    08-09-2012
    Location
    Ireland
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    368

    Re: Code to prevent duplicate entries

    Sorry Patel,

    One other thing, when I get the above error and click debug and run the code again without make any changes, it runs perfectly and clears the duplicates.

    It might be something related to memory...

    Cheers,
    Filipe.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 0
    Last Post: 06-14-2012, 12:38 PM
  2. Prevent Duplicate Entries
    By whousedmy in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-17-2010, 11:40 AM
  3. Prevent Duplicate Entries
    By luckyphil in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-07-2007, 08:20 AM
  4. code to prevent duplicate entries
    By cart0250 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-19-2006, 02:44 PM
  5. [SOLVED] Prevent duplicate entries
    By Teri in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-03-2005, 10:06 PM

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