vlookup function addressing

J

jacky.newsgroup

Hi,

I would like to use this:
+vlookup(value, data range, col, false)


data range = start position:B20


the value of the start position is stored in cell D1, it is
"calculated" by some functions and put into cell D1


how do i used vlookup to use the start position in D1 automatically? i
do not want to type it manually
 
M

Max

INDIRECT would provide the required functionality

Assuming the "full" data range is, say: A1:B20
and the formula in D1 would evaluate to a number between 1 to 20 (say)

we could use something like:
=VLOOKUP(C1,INDIRECT("A"&D1&":B20"),2,0)

If instead the formula in D1 evaluates to say; A1, A2, ... A20
then simply use:
=VLOOKUP(C1,INDIRECT(D1&":B20"),2,0)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top