Hi, as a VBA newbie I'm struggling with this challenge.
I have two spreadsheets, a source spreadsheet containing a table of data and a destination spreadsheet into which I need to have data placed at the press of a button.
I have attached each sheet. In the destination s/sheet the user will type the store number, then click a button. This will then look up the matching record in the source spreadsheet and then copy the average balance value into the destination s/sheet (into the yellow box).
Why do you need VBA? You could use a formula like this:
=VLOOKUP(A4,Source.xlsx!$A$2:$D$1999,4,FALSE)
jonlake
ASKER
Thanks, this works very well. As a bonus is it possible to have the lookup operate if the source s/sheet were closed?
jonlake
ASKER
Hi StephenJR, unfortunately the s/sheet cannot contain formulas as it is loaded into our accoutning package and will freak out if it contains code. My plan is to use the code currently assigned to a button as an add-in, operated from a ribbon button.
=VLOOKUP(A4,Source.xlsx!$A