Updating Excel Spreadsheet

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
Invoice-Detail-Subtable-Test.xlsx
Chrisjack001Asked:
Who is Participating?
 
danishaniCommented:
You can use the VLOOKUP function for his;
=VLOOKUP(J2;'[Invoices-Table-Update-Test.xlsx]Sheet1'!$D:$E;2;FALSE)

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

 Invoice-Detail-Subtable-Test.xlsx
 Invoices-Table-Update-Test.xlsx
0
 
Chrisjack001Author Commented:
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
0
 
Chrisjack001Author Commented:
Thank you very much
0
 
danishaniCommented:
You are very welcome, family matters are more important, hope all is well! :)

Take care,

Daniel
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.