Results 1 to 14 of 14

Check duplicate from userform values before pasting to worksheet VBA

Threaded View

rakotonirinas Check duplicate from userform... 12-20-2018, 08:25 AM
nigelog Re: Check duplicate from... 12-20-2018, 11:38 AM
ebademci Re: Check duplicate from... 01-07-2019, 04:23 AM
nigelog Re: Check duplicate from... 01-07-2019, 08:31 AM
ebademci Re: Check duplicate from... 01-07-2019, 08:39 AM
nigelog Re: Check duplicate from... 01-07-2019, 09:21 AM
ebademci Re: Check duplicate from... 01-07-2019, 09:26 AM
nigelog Re: Check duplicate from... 01-07-2019, 09:36 AM
ebademci Re: Check duplicate from... 01-07-2019, 09:45 AM
nigelog Re: Check duplicate from... 01-07-2019, 09:53 AM
nigelog Re: Check duplicate from... 01-07-2019, 10:06 AM
ebademci Re: Check duplicate from... 01-08-2019, 01:58 AM
dotchiejack Re: Check duplicate from... 01-08-2019, 04:10 AM
ebademci Re: Check duplicate from... 01-08-2019, 04:37 AM
  1. #1
    Forum Contributor
    Join Date
    09-02-2013
    Location
    London
    MS-Off Ver
    Excel 2019
    Posts
    368

    Check duplicate from userform values before pasting to worksheet VBA

    Hello,
    I'm trying to record data by using a userform which will then write/paste values of boxes in the userform to a Sales worksheet. Instead of writing/pasting directly values on the userform, I would like first once the userform 'Record' button is clicked to check whether 2 values (Supplier and Reporting Month) of the userform are not already recorded on the worksheet. If these 2 values exist already simultaneously, then a "Duplicate" message box pops. Then Exit the Sub and clear all the contents of the userform. Otherwise, it will write the userform values to a new line (row) on the Sales worksheet.

    There were many ways of achieving the intended result nut I wonder if there is something simple and easy. I was thinking about using a evaluate command to use with Match function to render the formula on the worksheet Cell B15:
    Formula: copy to clipboard
    {=IF(MATCH(1,($B$9=$G:$G)*($B$10=$O:$O),0)>0, "Duplicate")}


    Below is the workbook I wrote with some help to achieve it. The issue though is that it doesn't do what it is intended to do.

    Your help is very much appreciated. Thank you.
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Check if entry on userform is not a duplicate before pasting on the worksheet
    By rakotonirinas in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-19-2018, 12:35 PM
  2. [SOLVED] Copy a row, check table for duplicate, give option to overwrite duplicate before pasting
    By Frankie_The_Flyer in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-11-2017, 09:56 PM
  3. Replies: 4
    Last Post: 08-21-2015, 03:59 PM
  4. Userform to check 2 textboxes for duplicate & date check
    By LadyAlina in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-24-2015, 09:26 AM
  5. Userform VBA to check 2 columns (A & B) for duplicate entries
    By stevebailey in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-24-2014, 04:27 AM
  6. Check for duplicate values within the same worksheet
    By aashishd233 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-16-2013, 03:34 PM
  7. Userform - check for duplicate entries
    By glynnhicks in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-16-2013, 10:48 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