C
chrismv48
Okay I'm trying to set a user defined range to use in VLOOKUP. Basically the
range will be changing frequently, and user needs will vary so I figured the
best way will be to have them choose what data they want to pull.
So I'd like the user to select the range, then to have that range used
in the vlookup formula that's already stored in a cell, E3.
Once that vlookup range is set, to let's say A1:B10 by the user, we need to
have a loop run that will increment the target cell each time. example:
-the formula in cell E3 would be "=VLOOKUP(C$10$,UserRange,5,False)"
-at this point i have additional code that will run to do other stuff; but
once it's done, I'd like the loop to start over so that target cell used in
VLOOKUP (C10) will need to increase by +1 until the last row in UserRange is
reached...so if currently
cell C10 (the target cell in E3) reads:
=July!A10 'the loop would add to the cell address each time by 1. So:
=July!A11
=July!A12
=July!A13
Until it reaches the end of the Vlookup range.
Sorry if that was confusing--but any help would be appreciated!
range will be changing frequently, and user needs will vary so I figured the
best way will be to have them choose what data they want to pull.
So I'd like the user to select the range, then to have that range used
in the vlookup formula that's already stored in a cell, E3.
Once that vlookup range is set, to let's say A1:B10 by the user, we need to
have a loop run that will increment the target cell each time. example:
-the formula in cell E3 would be "=VLOOKUP(C$10$,UserRange,5,False)"
-at this point i have additional code that will run to do other stuff; but
once it's done, I'd like the loop to start over so that target cell used in
VLOOKUP (C10) will need to increase by +1 until the last row in UserRange is
reached...so if currently
cell C10 (the target cell in E3) reads:
=July!A10 'the loop would add to the cell address each time by 1. So:
=July!A11
=July!A12
=July!A13
Until it reaches the end of the Vlookup range.
Sorry if that was confusing--but any help would be appreciated!