Results 1 to 11 of 11

VBA to check new entry for duplicates and then copy present values

Threaded View

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

    VBA to check new entry for duplicates and then copy present values

    Hi all.

    I know that similar problems can be found around the web, but I am new to the whole VBA thing and thus thought it better to ask.

    I have a range in a worksheet, A2:A10000, which contains reference numbers (let's called them X). What I need is that when a reference X gets entered into any cell of that range (A2:A10000), a macro will check if that reference X is anywhere else in that range, aka look for duplicates. IF there is a duplicate, I need an option popup box that asks to copy values from that duplicate (Yes or No). If selected Yes, I would like values from columns B and C, but the same row as the duplicate, to be copied to the new entry made.

    As an example, let's say that a duplicate is entered in A30 that is also found in A27. What I then need is to copy the value from B27 to B30 and the value from C27 to C30.
    I'm fairly sure this can be simply coded, but I haven't found a way to work around the row-column indexing nor the popup box.
    Last edited by Fno; 02-09-2016 at 12:32 PM. Reason: solved

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 1
    Last Post: 09-22-2015, 02:47 AM
  2. [SOLVED] macro to check for duplicates and copy data if no duplicate found
    By lwayl in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-22-2015, 01:31 AM
  3. Replies: 2
    Last Post: 09-03-2014, 03:37 AM
  4. Check for Duplicates when user enters values in the UserForm
    By s2jrchoi in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-27-2012, 03:43 PM
  5. Copy For Cell Values Present and not Formulas Present
    By bdb1974 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-11-2009, 12:10 PM
  6. Macro to check for blank cell entry, copy previous value, and check for duplicates
    By xPunxNotDeadx in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-26-2009, 06:33 PM
  7. check for duplicates, then sum unique values
    By Weissme in forum Excel General
    Replies: 0
    Last Post: 08-09-2006, 11:35 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