Does anyone know of a way to use vlookup dynamically in a macro? What I'm trying to do is look up info from a cell in a column based upon what is in that cell (much like copying & pasting a cell that already has vlookup in it...
ie.
cell D10 is =vlookup(D10,rangename,3,false)
if I copy & paste to D12 it becomes
=vlookup(D12,rangename,3,false).
I'm really looking for the dynamic part to be the cell address... something like
dim x as int
for x = 1 to 1000
if activecell.text = "N/A" then
activecell.text = "=vlookup(address,rangename,3,false)"
endif
next x
I really would rather not have to move to the range & cycle through all of the rows to see if I get a hit on what was in my "address". Hope this make some sense.
TIA
longhair
ie.
cell D10 is =vlookup(D10,rangename,3,false)
if I copy & paste to D12 it becomes
=vlookup(D12,rangename,3,false).
I'm really looking for the dynamic part to be the cell address... something like
dim x as int
for x = 1 to 1000
if activecell.text = "N/A" then
activecell.text = "=vlookup(address,rangename,3,false)"
endif
next x
I really would rather not have to move to the range & cycle through all of the rows to see if I get a hit on what was in my "address". Hope this make some sense.
TIA
longhair