Thread: Double lookup
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_7_] Bob Phillips[_7_] is offline
external usenet poster
 
Posts: 1,120
Default Double lookup

=INDEX(C1:C100,MATCH(M1&M2,A1:A100&B1:B100,0))

where M1 is your lookup fruit, M2 is your lookup date.

--
HTH

Bob Phillips

"Dean" wrote in message
...
I can't believe I don't know this. I'll call it a double, or nested,

lookup
problem. Basically, based on getting a match in two columns, I want to

read
the value in a 3rd column. For example...

Suppose I make a little table in EXCEL where the first column has the type
of fruit, say apple in row 2, orange in row 3, pear in row 4. Then, the
next column has a date, such as April 1st in each of these rows. Then ,

the
next column has the price of the particular fruit on that date.

Now I copy those three rows down and repeat the exercise using the prices

of
the 3 fruit on the next day.

I continue doing this until I have 90 rows corresponding to the prices of
the 3 fruits on the 30 days of a month.

Now, I want to be able to automatically lookup the price of a particular
fruit on a particular date. How would I do this with vlookup(s)? If it
would work better, I could first sort things so that I had the 30 day's
prices of apples at the top, then oranges, then pears.

Thanks!

Dean
price of an apple, then orange, then pear, all at the end of March in the
first row