+ Reply to Thread
Results 1 to 10 of 10

Need assistance with Macro to stop duplicate entries

  1. #1
    Registered User
    Join Date
    03-29-2014
    Location
    Portugal
    MS-Off Ver
    Excel 2013
    Posts
    73

    Need assistance with Macro to stop duplicate entries

    Hi all,

    Need to stop duplicate entries into the database sheet, is this possible in VBA?

    Would like to set it in column J (Mobile ph), of the attached workbook.

    Many Thanks
    Attached Files Attached Files

  2. #2
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,021

    Re: Need assistance with Macro to stop duplicate entries

    .
    Change your CONTACTS worksheet macro with this :

    Please Login or Register  to view this content.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    03-29-2014
    Location
    Portugal
    MS-Off Ver
    Excel 2013
    Posts
    73

    Re: Need assistance with Macro to stop duplicate entries

    Thanks for the fast feedback Logit, I entered a duplicate and it allowed it

  4. #4
    Registered User
    Join Date
    03-29-2014
    Location
    Portugal
    MS-Off Ver
    Excel 2013
    Posts
    73

    Re: Need assistance with Macro to stop duplicate entries

    I put it on the database sheet instead and it intercepted the duplicate entry but still allowed it!

  5. #5
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,021

    Re: Need assistance with Macro to stop duplicate entries

    .
    Using the CONTACTS sheet and the last entry in the column ( 936 555 333 ) ... if you go to the empty line below it ( in J column) and re-enter that same number, in the same pattern, the macro functions.

    Same pattern : 936 *space* 555 *space* 333

    If you enter the number in any other pattern the macro will not work.

    It also works if you paste the number in the cell.


    ?????

  6. #6
    Registered User
    Join Date
    03-29-2014
    Location
    Portugal
    MS-Off Ver
    Excel 2013
    Posts
    73

    Re: Need assistance with Macro to stop duplicate entries

    Hummmm..! maybe I didn't explain myself properly.

    Yes If I select column J in the last row, the Macro does indeed work! however the order of data entry or updating is a bit different! let me explain....

    If you select a contact, the info gets loaded in cells I6 through to M12, on those cells is where any changes are made and than pressing the update button and one of those changes was a number that already exist! the Macro doesn't seem to work, Also if you press the NEW button and enter the info in cells I6 through to M12 and the Mobile ph is a duplicate it also does not work!

    Entering data directly on the last row Is not intended, the process of the workbook is as follows, data is entered or edited in the cells I6 through to M12 and than copied to the database sheet after pressing the save button, and in turn the list on the Contacts page gets refreshed from what is on the database!

    So I am not really sure where (which sheet) or Module should this macro be put into!!!!

  7. #7
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,021

    Re: Need assistance with Macro to stop duplicate entries

    .
    Hmmm.... Ok ... that's waaaay different from what was originally described.

    Let me think about it. I'll get back with you. It's late here now (midnight). Time for sleep.

  8. #8
    Registered User
    Join Date
    03-29-2014
    Location
    Portugal
    MS-Off Ver
    Excel 2013
    Posts
    73

    Re: Need assistance with Macro to stop duplicate entries

    Hi, No drama Logit, whenever u find the time....

  9. #9
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,021

    Re: Need assistance with Macro to stop duplicate entries

    .
    Ok ... this macro will check for dupes in Col D (Mobile Phone #) of the DATABASE sheet.

    Please Login or Register  to view this content.
    You could add to it to check other columns as well.
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    03-29-2014
    Location
    Portugal
    MS-Off Ver
    Excel 2013
    Posts
    73

    Re: Need assistance with Macro to stop duplicate entries

    Thanks very much for you effort Logit.

+ 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] count the duplicate entries with the help of Macro
    By chirag_patel5141 in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 09-22-2021, 01:14 AM
  2. Stop Macro bringing across duplicate data
    By excel_learner2 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-09-2018, 10:13 PM
  3. Replies: 0
    Last Post: 06-14-2012, 12:38 PM
  4. VBA to stop duplicate entries?
    By thelostscott in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-20-2010, 07:44 AM
  5. If no items in column sort - how to stop macro copying all entries
    By nigelog in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-04-2008, 12:50 PM
  6. Stop duplicate entries
    By jiminic in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-21-2007, 08:57 AM

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