+ Reply to Thread
Results 1 to 12 of 12

on duplicate entry in the same column - show popup

  1. #1
    Forum Contributor
    Join Date
    02-28-2012
    Location
    india
    MS-Off Ver
    Excel 2013
    Posts
    542

    on duplicate entry in the same column - show popup

    In my worksheet on column B if i make a second entry of the same name of stock it should give a popup :recurrence in cell B3
    pls see the attached file
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: on duplicate entry in the same column - show popup

    Recurrence cell "B5, cell B10"
    Unless you have TEXTJOIN, this is only possible via VBA.

    I did see a formula that could do this last week but it was extremely complicated and most likelt data dependent.

    You can use Conditional Formatting with a COUNTIF to highlight a duplicate when it's entered.
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Valued Forum Contributor
    Join Date
    01-07-2013
    Location
    Michigan
    MS-Off Ver
    O365
    Posts
    601

    Re: on duplicate entry in the same column - show popup

    You could also use a COUNTIF formula with data validation to prevent duplicate entries, with an error message saying it's a duplicate value. It just wouldn't specify the duplicate cell:
    Please Login or Register  to view this content.
    Adjust your range as necessary. See attached file incorporating both solutions.
    Last edited by Melvosh; 03-22-2019 at 12:47 PM. Reason: attached file

  4. #4
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: on duplicate entry in the same column - show popup

    This should do it in the worksheet module. Note remove comments from column B.

    Please Login or Register  to view this content.
    Attached Files Attached Files
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  5. #5
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: on duplicate entry in the same column - show popup

    Here is a non-vba version using the same logic. But you need the data in a table so the formula copies down and the range automatically extends with the table.
    Attached Files Attached Files

  6. #6
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,743

    Re: on duplicate entry in the same column - show popup

    Into sheet module.

    Please Login or Register  to view this content.
    Happy with my answer * Add Reputation.
    If You are happy with solution, please use Thread tools and mark thread as SOLVED.

  7. #7
    Forum Contributor
    Join Date
    02-28-2012
    Location
    india
    MS-Off Ver
    Excel 2013
    Posts
    542

    Re: on duplicate entry in the same column - show popup

    KOKOSEK,thanks for the code.
    after adding the code to sheet module...........
    RELIANCE is already in B7................
    i entered reliance in B9. it gives a POPUP saying "recurrance B9...............
    The pop up should say recurrance B7 and NOT B9 . the code should look for the previous entry and not for the present. if there are two occurances it should show all the cell addresses.

  8. #8
    Forum Contributor
    Join Date
    02-28-2012
    Location
    india
    MS-Off Ver
    Excel 2013
    Posts
    542

    Re: on duplicate entry in the same column - show popup

    dflak, thanks for the code. i incorporated the code in the sheet module. when i enter reliance in cell B9 it does give a popup. But if there are already two entries and i am making the third it will give the same popup. code only takes the first entry reference.
    i wish that the popup gives cell references.for example,,,,,,,,,,,, if "reliance" has two apperances before, then on the third entry the popup should say recurrences in cell b3 ,b9
    Attached Files Attached Files
    Last edited by sumesh56; 04-06-2019 at 12:28 PM.

  9. #9
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,743

    Re: on duplicate entry in the same column - show popup

    Two small tweaks:

    Please Login or Register  to view this content.

  10. #10
    Forum Contributor
    Join Date
    02-28-2012
    Location
    india
    MS-Off Ver
    Excel 2013
    Posts
    542

    Re: on duplicate entry in the same column - show popup

    KOKOSEK, works fine.

    if there is one comma after each cell address it would have been more convenient. can we incorporate that option also in the code?also make it case free. Uppercase/Lowercase(reliance/RELIANCE)

    if reliance is there on B2
    it is there in B12
    then when i enter it on B20, the pop up should show ----recurrence in B2,B12

    if i enter reliance in B28, the pop up should say........recurrence in B2,B12,B20
    Last edited by sumesh56; 04-11-2019 at 12:30 PM.

  11. #11
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,743

    Re: on duplicate entry in the same column - show popup

    Please Login or Register  to view this content.
    What you mean as case free?
    reliance <> RELIANCE ---> remove UCase from code
    reliance = RELIANCE ---> leave UCase in code

  12. #12
    Forum Contributor
    Join Date
    02-28-2012
    Location
    india
    MS-Off Ver
    Excel 2013
    Posts
    542

    Re: on duplicate entry in the same column - show popup

    kOKOSEK, thanks for the code . it works fine. have a nice day

+ 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] VBA code to show Warning Message Box popup if certain text is found in column
    By Tapyr in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-15-2016, 11:39 AM
  2. [SOLVED] For every duplicate entry in column D, highlight row if G column value is separate
    By ks100 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-12-2015, 06:02 PM
  3. Replies: 2
    Last Post: 03-09-2013, 10:14 PM
  4. [SOLVED] show message box when a duplicate entry is entered into a userform textbox
    By reggie1000 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-04-2012, 05:53 AM
  5. [SOLVED] Assign a Value to a Duplicate Entry Within the Same Column
    By Scott C. in forum Excel General
    Replies: 4
    Last Post: 08-09-2011, 10:04 AM
  6. Modify code to show message box on duplicate entry
    By twofootgiant in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 06-24-2011, 07:50 AM
  7. Remove Row If Duplicate Entry In Column A
    By Tyler_Durden in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-01-2009, 05:05 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