+ Reply to Thread
Results 1 to 10 of 10

How to Find Duplicate Entry from Two Files

  1. #1
    Registered User
    Join Date
    11-05-2015
    Location
    Edmonton
    MS-Off Ver
    2010
    Posts
    5

    How to Find Duplicate Entry from Two Files

    Hello Guys,

    I have two Files for Invoice Entry. "Invoice Entry Master" and "Invoice Entry Daily". I am pasting the data from "Invoice Entry Daily" to "Invoice Entry Master" on a regular basis. I would like to know whether there is any VBA code for checking if the Invoice Number is already exist in the "Invoice Entry Master" file while I am entering the Invoice Entries in to my "Invoice Entry Daily File". I want to just pop up 1 message box.

    My files are located in this path "C:\Users\Admin\Invoice Entry Master.xlsx" and "C:\Users\Admin\Invoice Entry Daily.xlsx".

    As per my knowledge I have to use a loop and check in my "C:\Users\Admin\Invoice Entry Master.xlsx" if the Invoice Number I have entered is already exist in my "Invoice Entry Master" file.

    Please let me know

    Thanks in Advance

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: How to Find Duplicate Entry from Two Files

    Hi Jithu,

    You can load a dictionary with the master entries and then just see whether what you've typed already exists!

    Welcome to the Forum!

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,565

    Re: How to Find Duplicate Entry from Two Files

    Hi jithu_ex,

    Welcome to the forum!!

    You could just have a VLOOKUP formula in your "Invoice Entry Daily File" file (ideally in the column next to where you're entering the invoice numbers) that looks up your entry to the "Invoice Entry Master" workbook and if found returns a message saying that invoice number has been used or no message if it hasn't been used. No need for VBA.

    HTH

    Robert
    ____________________________________________
    Please ensure you mark your thread as Solved once it is. Click here to see how
    If this post helps, please don't forget to say thanks by clicking the star icon in the bottom left-hand corner of my post

  4. #4
    Registered User
    Join Date
    11-05-2015
    Location
    Edmonton
    MS-Off Ver
    2010
    Posts
    5

    Re: How to Find Duplicate Entry from Two Files

    Million Thanks for your reply.

    In my Excel master file the Invoice numbers are in column D and in my Daily Entry file also the Invoice Number is in Column D.

    Could you please tell me how would be the Vlookup formula to find whether the Invoice Number is duplicate? My apologies I am very new to the advanced functions of Excel.

    Thanks

  5. #5
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,565

    Re: How to Find Duplicate Entry from Two Files

    What is the sheet name in the "Invoice Entry Master" workbook that contain the invoice numbers?

  6. #6
    Registered User
    Join Date
    11-05-2015
    Location
    Edmonton
    MS-Off Ver
    2010
    Posts
    5

    Re: How to Find Duplicate Entry from Two Files

    Sheet1 and in the Daily Entry file also the name of the sheet is Sheet1

  7. #7
    Registered User
    Join Date
    11-05-2015
    Location
    Edmonton
    MS-Off Ver
    2010
    Posts
    5

    Re: How to Find Duplicate Entry from Two Files

    Hi,

    Any updates?

    Thanks

  8. #8
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,565

    Re: How to Find Duplicate Entry from Two Files

    Put this formula in the first cell (ideally cell E2) you wish to check the invoices from in the "Invoice Entry Daily" file...

    =IF(ISERROR(VLOOKUP(D2,'C:\Users\Admin\[Invoice Entry Master.xlsx]Sheet1'!$D:$D,1,FALSE)),"","Invoice number " & D2 & " has already been used.")

    ...and copy it as far down the column you need.

    Regards,

    Robert

  9. #9
    Registered User
    Join Date
    11-05-2015
    Location
    Edmonton
    MS-Off Ver
    2010
    Posts
    5

    Re: How to Find Duplicate Entry from Two Files

    Thanks a lot

  10. #10
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,565

    Re: How to Find Duplicate Entry from Two Files

    You're welcome. If you could mark the thread as solved it would be appreciated.

+ 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. Find and delete duplicate files if they exist in another specified folder
    By gws1971 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-21-2016, 09:51 AM
  2. Replies: 0
    Last Post: 02-04-2014, 12:36 AM
  3. [SOLVED] Code to find duplicate colors and keep only 1 entry
    By NeedForExcel in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-16-2013, 12:57 AM
  4. [SOLVED] Find Duplicates and remove the duplicate entry comparing two columns
    By retrospikz in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-04-2013, 03:17 AM
  5. Find duplicate entry in list
    By kenexcel in forum Excel General
    Replies: 1
    Last Post: 11-02-2010, 04:26 AM
  6. How to find duplicate entries, and delete the earlier modified entry?
    By John2810 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-25-2010, 01:26 AM
  7. Replies: 1
    Last Post: 12-02-2005, 05:15 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