Vlookup VBA Beginner Help

B

billinr

I have a sheet where I paste data from another database report, extracted as
a .csv. This data contains only 3 columns: Plant, Date and Score.
There will be a maximum of 45 rows.
This data will change weekly, and not all plants will be represented each
week.

What I would like to do is to set up a button for the user to hit, once the
new data is pasted in. This button activates a macro which will take the new
data and place it on another sheet where the Scores are sorted by Plant and
Date. I intend to keep all the weekly scores in the sheet.
I can write a vlookup formula that works; how can I put it into a macro such
that it will process the entire sheet?

With the new data sheet formatted as:
Column A Column B Column C
Plant Date Score

And the Storage sheet formatted as:
Column A Column B Column C Column D ........
Plant Date 1 Date 2 Date 3 ........
Plant 1 Score 1 Score 2 Score 3 .......
Plant 2 Score 1 Score 2.......

This is my formula (from the storage sheet):
=IF(Start!$B$2=B$1,(VLOOKUP($A3,Start!$A$2:$C$20,3,FALSE)),NA())
This formula moves over as necessary by date.

Any ideas as to how to set this up?

Thanks for the help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top