+ Reply to Thread
Results 1 to 14 of 14

Prvent Duplicates in Range A2:A100 while coping in to another sheet

  1. #1
    Registered User
    Join Date
    12-17-2011
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    81

    Prvent Duplicates in Range A2:A100 while coping in to another sheet

    Dear Expert

    I have a two sheets first is Data Entry & second is Data Sheet i want a macro to prevent duplicates value in Range (Data Entry A2:A100) while updating the data sheet (range A2:A1048576)

    The Excel sheet is attached for reference.

    Please Login or Register  to view this content.
    Your help in this regards will be highly appreciated
    Thanks in advance
    Vaibhav
    Attached Files Attached Files

  2. #2
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,125

    Re: Prvent Duplicates in Range A2:A100 while coping in to another sheet

    This indirectly addresses your problem. Instead of entering duplicates to begin with, this code alerts the user that the entry is a duplicate.

    In sheet 1 code page.
    Please Login or Register  to view this content.
    If you are dropping a range of entries in, instead of typing them in individually, then I would check for dupes before attempting to move them. Delete the dupes, then move them to the data sheet.
    David
    (*) Reputation points appreciated.

  3. #3
    Registered User
    Join Date
    12-17-2011
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    81

    Re: Prvent Duplicates in Range A2:A100 while coping in to another sheet

    Dear Sir,

    Thanks for your valuable reply, but can you post this code in my attached workbook, i am very new in VBA hence enable to understand code

    Thanks
    Vaibhav

  4. #4
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,125

    Re: Prvent Duplicates in Range A2:A100 while coping in to another sheet

    See attached.
    Attached Files Attached Files
    Last edited by Tinbendr; 08-17-2012 at 08:40 AM.

  5. #5
    Registered User
    Join Date
    12-17-2011
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    81

    Re: Prvent Duplicates in Range A2:A100 while coping in to another sheet

    Dear Sir,

    Thank you, but data not copying on sheet2, please look into

    Regards
    Vaibhav

  6. #6
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,125

    Re: Prvent Duplicates in Range A2:A100 while coping in to another sheet

    Oops. Had a couple of things out of sort. Try it again.

  7. #7
    Registered User
    Join Date
    12-17-2011
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    81

    Re: Prvent Duplicates in Range A2:A100 while coping in to another sheet

    Dear Sir,

    Thank you very much the code is awesome, but one more thing is required

    i don't want to copy duplicate values of column A (Data entry sheet) to data sheet

    if product code already exits then popup the message " This product code is already exits please try another code"


    if possible please help...

    Thank you
    Vaibhav

  8. #8
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,125

    Re: Prvent Duplicates in Range A2:A100 while coping in to another sheet

    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    12-17-2011
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    81

    Re: Prvent Duplicates in Range A2:A100 while coping in to another sheet

    Dear Sir,

    Superb, Awesome, Thanks for the help

    But after a popup message duplicate values still copying to data sheet
    i don't want to copy duplicate values of column A (Data Entry) to data sheet

    If you could help that is very useful to me.

    Thanks in advance
    Vaibhav2312

  10. #10
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,125

    Re: Prvent Duplicates in Range A2:A100 while coping in to another sheet

    OK, replace the sub with this new one.

    Please Login or Register  to view this content.

  11. #11
    Registered User
    Join Date
    12-17-2011
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    81

    Re: Prvent Duplicates in Range A2:A100 while coping in to another sheet

    Dear Sir,

    Thank you, but duplicate values are still copying after popup a message.

    The File is attached for reference.

    Regards
    Vaibhav
    Attached Files Attached Files

  12. #12
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,125

    Re: Prvent Duplicates in Range A2:A100 while coping in to another sheet

    OK I tested this several times. It should be working now. (Fingers crossed)
    Attached Files Attached Files

  13. #13
    Registered User
    Join Date
    12-17-2011
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    81

    Re: Prvent Duplicates in Range A2:A100 while coping in to another sheet

    Thank you very much sir This is very Helpful to me.

    i know i am asking very stupid question, but is it possible to duplicates cell values should not be clear.

    Please Login or Register  to view this content.
    Thank You
    Vaibhav

  14. #14
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,125

    Re: Prvent Duplicates in Range A2:A100 while coping in to another sheet

    Yes, just comment (or remove it) out that line.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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