X-Y correlations in a database; or two-way lookup

koledgegirl

New Member
Joined
Jan 6, 2010
Messages
8
I am struggling even coming up with a correct title for this question..

I have an X-Y database with each combination of X-Y values producing a result
X1 X2 X3
Y1 Z1 Z2 Z3
Y2 Z4 Z5 Z6
Y3 Z7 Z8 Z9

Actually what this is is a Data Table generated through the What-If analysis setup.

I want to create a plot of X and Y correlations resulting in a Z as specified by a constraint.
So what I am doing is
1. Identify the column (X) to lookup value
2. Lookup value (Z) in this column and return it's row
3. Look up Y based on the row number

The down-and-over method.. or something like that...
How in the world do I do this???
I can use Match for step 1, that's easy
I can use vlookup to find the VALUE but not it's row
Then I can't think of a formula to use to return a row of Z without specifying which column Z is located in.

Did I just completely confuse the crap out of everyone? :(
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Hi

Assuming headers and data are in A1:D4, A6 contains e.g. X2, A7 contains e.g. Z8, this will work:

=LOOKUP($A$7,INDEX($B$2:$D$4,,MATCH(A6,$B$1:$D$1,0)),$A$2:$A$4)
 
Upvote 0
omg..... genious!
thank you!!!
so now one more complication, if the LOOKUP finds and exact match - great; if not - it'll look for the first lesser value. how do i make it took for the first greater value?
 
Upvote 0
For instance,

=INDEX($A$2:$A$4,MIN(IF(INDEX($B$2:$D$4,,MATCH(A6,$B$1:$D$1,0))>=A7,ROW(INDEX($B$2:$D$4,,MATCH(A6,$B$1:$D$1,0)))-ROW($A$2)+1,10^10)))

confirmed with Ctrl-Shift-Enter since it is an array formula.
 
Upvote 0
you
are
amazing
!

okay. so i'd really try to understand this ... what combination makes excel go through iterative loops to find the closest greater value? the trick's gotta be in the fact that you're not identifying the row for the index... i don't know how to use array formulas at all...
well if this is easy to explain i'd appreciate it, i'll try to read up on it meanwhile
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,283
Members
452,902
Latest member
Knuddeluff

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top