HLOOKUP - Adjusting the lookup value...

R

Regnab

I'm trying to look up a value in the same row depending on the column
header (Product Codes, looking up their prices). I'm just wondering how
people do it so I can drag the forumula down the page and it'll adjust
the row that it's looking in. I tried CELL("ROWS") but that seemed to
reak havic with the formula so then I created a row with the
appropriate row number in it (which I then hid). I figure there has got
to be a better way....

Cheers

Reg
 
M

Max

Assuming we want the row_index_num to start with 2 (say)
we can use in the starting cell, example: ROW(A1)+1
to increment the index as we copy down the column

Example in say, A3, copied down:
=HLOOKUP(A$1,$K$1:$L$30,ROW(A1)+1,0)
 
M

Max

Regnab said:
I'll give it a shot - thanks for your help...

You're welcome.
It should work fine ..

And if we want it to increment
when we copy *across* from the starting cell
just swap eg: ROW(A1)+1
with: COLUMN(A1)+1

(use COLUMN instead of ROW)
 
Top