+ Reply to Thread
Results 1 to 3 of 3

Duplicates

  1. #1
    Registered User
    Join Date
    03-22-2017
    Location
    San Francisco
    MS-Off Ver
    Windows 7 professional
    Posts
    29

    Question Duplicates

    Hi I would like for my code to check if the entry has been submitted already before through a userform. So basically when I click on submit i want for it to check all the rows of a table that is linked to the userform and check if there is a row with the same information that match on a few textboxes with the information that is been submitted now.

    I have written this code as part of the submit button but nothing happens.

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    08-28-2014
    Location
    Texas, USA
    MS-Off Ver
    2016
    Posts
    1,796

    Re: Duplicates

    So the logic in your code is a bit flawed. The way it's set up now, it could find positive hit for all of those values, but every one of them could be in different rows. Meaning that you haven't found a duplicate, but it would appear that you did.

    The better way to do this is to look for one value (date, or whatever the most unique value would be), then check the relative positions for all the other values in that same row. Loop until all matching values are checked, or until a duplicate is found.

    I (and others) can help, but please upload a sample workbook with sample data and the userform.
    I'm interested in starting a career working with VBA, if anyone knows of any opportunities!

  3. #3
    Registered User
    Join Date
    03-22-2017
    Location
    San Francisco
    MS-Off Ver
    Windows 7 professional
    Posts
    29

    Question Re: Duplicates

    Here you go.

    So this would be on your submit button and also on the update button.
    Attached Files Attached Files

+ 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. [SOLVED] Macro to find duplicates, concatenate cells, then delete old duplicates (2)
    By cny in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-22-2016, 06:05 AM
  2. Macro to find duplicates, concatenate cells, then delete old duplicates
    By givemepuppies in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 03-04-2016, 02:43 AM
  3. Replies: 1
    Last Post: 07-30-2014, 02:37 PM
  4. Replies: 2
    Last Post: 12-27-2013, 09:24 AM
  5. [SOLVED] Macro to find duplicates, concatenate Unique Values, then delete old duplicates
    By lesoies in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-17-2013, 04:32 PM
  6. Replies: 17
    Last Post: 07-05-2011, 05:37 PM
  7. Replies: 3
    Last Post: 03-09-2011, 07:00 PM

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