View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Lars-Åke Aspelin[_2_] Lars-Åke Aspelin[_2_] is offline
external usenet poster
 
Posts: 913
Default using vlookup in a loop

On Fri, 19 Sep 2008 12:11:01 -0700, chrismv48
wrote:

Basically I have 2 sheets, "invoice" and "data".

I'm pulling data out of the data sheet and populating fields in the invoice.
I've been using vlookup to pull the data from the "data" sheet, populate the
invoice using the vlookup, do stuff with the invoice sheet (which i've built
a macro for already), and then I'd manually increase the target value by one
to go onto the next row.

I need a macro that will loop by adding +1 to the target value in my vlookup
formula and keep looping until there are no rows left.

Alternatively it'd be useful if a dialogue box would let the user tell the
macro where to start and end with the loop...if that's feasible.

any suggestions?



Please give some more information to make it easier to help:

1) What does your VLOOKUP statement look like right now
2) What do you mean by "target value"
3) What do you mean by "there are no rows left"

Lars-Åke