Hi,
I need your help in writing a formula that will find a value in an array, based on the labels of the row and column of that value.
Labels are values in the first row and column of that array, that identifies the looked up cell (at the cross of that row and column).
Example:
Density Viscosity Temperature Colour
Water 0.457 3.55 500 NoColour
Oil 0.525 3.25 400 Yellow
Gas 0.616 2.93 300 Black
Wine 0.675 2.75 250 Red
Beer 0.746 2.57 200 Green
Creme 0.835 2.38 150 Wihite
ex.1:
Oil (first parameter of the formula)
Temperature (second parameter of the formula)
400 (formula needed, based on "Oil" and "Temperature")
ex.2:
Wine
Colour
Red (formula needed, based on "Wine" and "Colour")
It seems that is something simple, based on both hlookup and vlookup, but I'm not able to combine that functions....
Thanks a lot,
Nick
PS. Pls check the attached text file for a proper format.
Last edited by nick61; 11-19-2009 at 08:23 AM.
If we assume data is listed in A:E headers in row 1 and types in A then
=INDEX($A:$E;MATCH("Oil";$A:$A;0);MATCH("Temperature"';$1:$1;0))
obviously constants (Oil, Temp) can be cell references to those cells containing items of interest.
EDIT:
Yes you could use VLOOKUP but it will generate greater calculation overheads (dependencies etc) -- INDEX/MATCH generally preferable and certainly more flexible I'd say.
=VLOOKUP("Oil",A:E,MATCH("Temperature",$1:$1,0),0)
Last edited by DonkeyOte; 11-19-2009 at 08:35 AM.
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
use index with match on row/column
Mojito connoisseur and a dabbler in Cisco
where does code go ?
look here
how to insert code
how to enter array formula
why use -- in sumproduct
recommended reading
wiki Mojito
how to say no convincingly
most important thing you need
Martin Wilson: SPV
and RSMBC
Hi Nick,
Attached is a sample file ...
HTH
Thanks a lot to everyone guys !
Nick
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks