ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Automatically increment cell reference (https://www.excelbanter.com/excel-programming/417589-automatically-increment-cell-reference.html)

chrismv48

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!







All times are GMT +1. The time now is 08:24 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com