View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
chrismv48 chrismv48 is offline
external usenet poster
 
Posts: 11
Default Automatically increment cell reference

Hello,

Bit of a rookie when it comes to VBA so bare with me.

I have a vlookup formula, whose target is the cell E3.

E3 in turn points to a cell from another worksheet, lets say it's =July!A10.

How do I have a macro run so that it increases E3's cell reference by 1 row
each time? ie., 1st run =July!A11, 2nd loop =July!A12, 2nd loop =July!A13
and so on (I already have separate code that I will insert into the loop).
Then I'd want the macro to stop once it reaches the last row of data on
July's worksheet, which unfortunately is dynamic. Maybe the user can be
prompted to select the range to run the macro for? I don't know...

Any help would be greatly appreciated!