+ Reply to Thread
Results 1 to 6 of 6

Macro for preventing of entering duplicates in column M

  1. #1
    Registered User
    Join Date
    02-28-2016
    Location
    Europe
    MS-Off Ver
    2010
    Posts
    8

    Macro for preventing of entering duplicates in column M

    Hi, I need to write a macro sub for preventing of entering duplicates in column M in excel.

    Ex:

    I enter "A - 100" in cell M5
    If I enter "A - 100" in cell M7 I want to show me an error message that is duplicate.

  2. #2
    Forum Expert sourabhg98's Avatar
    Join Date
    10-22-2014
    Location
    New Delhi, India
    MS-Off Ver
    Excel 2007, 2013
    Posts
    1,899

    Re: Macro for preventing of entering duplicates in column M

    Invalid post - ignore
    Last edited by sourabhg98; 03-06-2016 at 08:42 AM.

  3. #3
    Registered User
    Join Date
    02-28-2016
    Location
    Europe
    MS-Off Ver
    2010
    Posts
    8

    Re: Macro for preventing of entering duplicates in column M

    are you sure?

    The command is incomplete.
    Last edited by bajramo; 03-06-2016 at 07:53 AM.

  4. #4
    Forum Expert sourabhg98's Avatar
    Join Date
    10-22-2014
    Location
    New Delhi, India
    MS-Off Ver
    Excel 2007, 2013
    Posts
    1,899

    Re: Macro for preventing of entering duplicates in column M

    I am really sorry posted that by mistake.
    Select column A.
    Goto DATA >> DATA VALIDATION >> CUSTOM
    Enter this formula- =CountIf($A$1:$A1,$A1)=1

    You can change the error message as per your requirement.
    Also this would work only for typed values. So if you copy values from other cells this wont work.
    Last edited by sourabhg98; 03-06-2016 at 08:45 AM.

  5. #5
    Forum Contributor
    Join Date
    06-29-2014
    Location
    India
    MS-Off Ver
    2010 Windows 10 64 bits
    Posts
    1,269

    Re: Macro for preventing of entering duplicates in column M

    Try this:

    Please Login or Register  to view this content.
    Sincerely,

    mso3

  6. #6
    Forum Contributor
    Join Date
    06-29-2014
    Location
    India
    MS-Off Ver
    2010 Windows 10 64 bits
    Posts
    1,269

    Re: Macro for preventing of entering duplicates in column M

    Hi bajramo,

    If your problem is solved then mark the thread solved.

+ 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. Preventing duplicates
    By MartinHK in forum Excel General
    Replies: 8
    Last Post: 09-20-2014, 12:44 PM
  2. Preventing Duplicates While Entering Data in Excel 2007
    By ExcelTip in forum Tips and Tutorials
    Replies: 2
    Last Post: 06-22-2014, 08:27 AM
  3. Preventing Duplicates
    By dooz1990 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-16-2013, 04:54 PM
  4. Preventing column duplicates unless specific condition
    By ericequip in forum Excel General
    Replies: 10
    Last Post: 05-27-2011, 08:21 AM
  5. Preventing Duplicates
    By yegnal in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-31-2010, 01:13 AM
  6. Preventing from entering duplicate values in the same column across sheets
    By coach_tyro in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 03-12-2008, 06:43 PM
  7. Preventing user entering duplicate values in a cell range
    By Thomas Peters in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-30-2005, 04:10 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