Updating Excel Spreadsheet

Posted on 2011-05-03
Last Modified: 2012-05-11
I have an Excel spreadsheet called “Invoices Table Update_Test” that I would like to use column A “InvoiceID” field and Column E “Study” field to update another Excel spreadsheet called “Invoice Detail Subtable_Test”. The field to update in this spreadsheet is column B “InvoiceID” field. We will match each “Study” field column J in “Invoice Detail Subtable_Test” to column E “Study” field in “Invoices Table Update_Test”. Once you match a “Study” copy the corresponding “InvoiceID” in column A and paste in the corresponding cell in column B in the “Invoice Detail Subtable_Test”. Example the for “Study” id “123”, the “InvoiceID” is “16719”. That InvoiceID should be copied from A3 of “Invoices Table Update_Test” and pasted to cell B2 of the “Invoice Detail Subtable_Test”. I want to create a Macro or VBA or code that can go through thousands of records and update till it complete the last row which in this case is 611 . Can you please help me. Attached are the 2 Excel spreadsheets  Invoices-Table-Update-Test.xlsx
Question by:Chrisjack001
    LVL 12

    Accepted Solution

    You can use the VLOOKUP function for his;

    Make sure that you copy the InvoiceID column, right after the Study Column in sheet Invoices-Table-Upate-Test.xlsx.


    Author Closing Comment

    I'm sorry for the late response. I had a family emergency and I have been away from my computer for almost 2 weeks. The solution worked great. Thanks very much

    Author Comment

    Thank you very much
    LVL 12

    Expert Comment

    You are very welcome, family matters are more important, hope all is well! :)

    Take care,


    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    Join & Write a Comment

    Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
    Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
    In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now