I have two formulas for a cell reference: ="D"&ROW()
and ="D$"&(ROW()-1)
These work fine on their own, but not when I put them in a VLOOKUP:=VLOOKUP("D"&ROW(),D$3:"D$"&(ROW()-1),1,0)
Using the ADDRESS
function gave the same error as using the ROW
function. I have successfully worked around this using INDIRECT
in the VLOOKUP
formula, but that seems clunky and unnecessarily complicated. Is there a way to do this without using INDIRECT
?
Best Answer
INDIRECT is Volatile; use INDEX instead:
=VLOOKUP(INDEX(D:D,ROW()),D$3:INDEX(D:D,ROW()-1),1,FALSE)
But upon typing that I see that it would be easier to just put the first row in the reference and keep it dynamic. So if the first row where 4 then
=VLOOKUP(D4,D$3:D3,1,FALSE)
Then as it is dragged/copied down only the D4 and the second D3 would change, leaving the first anchored on D3.