VBA to use Vlookup on another spreadsheet.

ManxBen

New Member
Joined
Nov 15, 2016
Messages
3
Hi All

Looking for some help with a VBA code.

Each day I get 2 reports generated from different systems.

The first shows the current status of orders and the second shows whether money has been received.

The first spreadsheets data looks like:

NameDateStatusOrder Number
Tim01/11/2016Pending payment111111111
James15/11/2016Pending payment222222222
Sam17/11/2016Pending payment333333333
Leah20/11/2016Pending payment444444444
Luke21/11/2016Pending payment555555555
Paul21/11/2016Pending payment666666666

<colgroup><col><col><col><col></colgroup><tbody>
</tbody>


The Second reports data looks like


Order NumberCurrency ReceivedAmount ReceivedDate received
222222222GBP100020/11/2016
444444444EUR120021/11/2016
666666666USD999.9921/11/2016


<colgroup><col><col><col><col></colgroup><tbody>
</tbody>


I would like to add a VBA code to the first spreadsheet to use a Vlookup to source data from the second Spreasheet to identify where funds have been received.

The second spreadsheet is saved within C:\Users\John\Documents\Payment Report.xlsx

Could someone assist me in how to I add a Vlookup to column E, F and G to return the Currency, Amount and date from the Payment Report. if the Order number is on both reports.

This will also need to go to the last row of data so if you could include this that would be great.

Thanks
Ben
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Hi Ben,
how far did you get with formulas/recording a macro? Please do post your code here (in [ CODE ] brackets), so we can give you some feedback.
Cheers,
Koen
 
Upvote 0

Forum statistics

Threads
1,215,338
Messages
6,124,358
Members
449,155
Latest member
ravioli44

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top