2-Dimensional Vlookup

bbehr7

New Member
Joined
Sep 26, 2013
Messages
5
Hey!

I was able to figure out how to do a two-dimensional vlookup with the match function. But I also need to do a 2 dimension vlookup in the reverse order. (ex. bring the info from a list into a chart.) I've included a very simple example below to help.


Below is the information I am given: Both the fruit and the quanity columns are entered, but there are multiple sources of each, but only one combination of each. Ex. apple 1, apple 2, bannana 2
[TABLE="class: cms_table"]
<TBODY>[TR]
[TD]
fruit</SPAN>[/TD]
[TD]quanity</SPAN>[/TD]
[TD]price(each)</SPAN>[/TD]
[/TR]
[TR]
[TD]apples </SPAN>[/TD]
[TD="align: right"]1</SPAN>[/TD]
[TD="align: right"]1.2</SPAN>[/TD]
[/TR]
[TR]
[TD]apples </SPAN>[/TD]
[TD="align: right"]2</SPAN>[/TD]
[TD="align: right"]1</SPAN>[/TD]
[/TR]
[TR]
[TD]apples </SPAN>[/TD]
[TD="align: right"]3</SPAN>[/TD]
[TD="align: right"]0.9</SPAN>[/TD]
[/TR]
[TR]
[TD]bananas</SPAN>[/TD]
[TD="align: right"]1</SPAN>[/TD]
[TD="align: right"]0.95</SPAN>[/TD]
[/TR]
[TR]
[TD]bananas</SPAN>[/TD]
[TD="align: right"]2</SPAN>[/TD]
[TD="align: right"]0.9</SPAN>[/TD]
[/TR]
[TR]
[TD]bananas</SPAN>[/TD]
[TD="align: right"]3</SPAN>[/TD]
[TD="align: right"]0.85</SPAN>[/TD]
[/TR]
[TR]
[TD]oranges</SPAN>[/TD]
[TD="align: right"]1</SPAN>[/TD]
[TD="align: right"]1.25</SPAN>[/TD]
[/TR]
[TR]
[TD]oranges</SPAN>[/TD]
[TD="align: right"]2</SPAN>[/TD]
[TD="align: right"]1.15</SPAN>[/TD]
[/TR]
[TR]
[TD]oranges</SPAN>[/TD]
[TD="align: right"]3</SPAN>[/TD]
[TD="align: right"]1.05</SPAN>[/TD]
[/TR]
</TBODY>[/TABLE]




I need the information to populate into a chart like the one below:

[TABLE="class: cms_table"]
<TBODY>[TR]
[TD="class: cms_table_xl65, width: 64, bgcolor: transparent"][/TD]
[TD="class: cms_table_xl65, width: 64, bgcolor: transparent, align: right"]1[/TD]
[TD="class: cms_table_xl65, width: 64, bgcolor: transparent, align: right"]2[/TD]
[TD="class: cms_table_xl65, width: 64, bgcolor: transparent, align: right"]3[/TD]
[/TR]
[TR]
[TD="class: cms_table_xl65, bgcolor: transparent"]apples[/TD]
[TD="class: cms_table_xl65, bgcolor: transparent"]x[/TD]
[TD="class: cms_table_xl65, bgcolor: transparent"][/TD]
[TD="class: cms_table_xl65, bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="class: cms_table_xl65, bgcolor: transparent"]oranges[/TD]
[TD="class: cms_table_xl65, bgcolor: transparent"][/TD]
[TD="class: cms_table_xl65, bgcolor: transparent"][/TD]
[TD="class: cms_table_xl65, bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="class: cms_table_xl65, bgcolor: transparent"]bananas [/TD]
[TD="class: cms_table_xl65, bgcolor: transparent"][/TD]
[TD="class: cms_table_xl65, bgcolor: transparent"][/TD]
[TD="class: cms_table_xl65, bgcolor: transparent"][/TD]
[/TR]
</TBODY>[/TABLE]



So where I entered an "X" in the correspond Apple & 1 box should be 1.2 and the same for the rest of the information.

Please help! I have been trying to figure this out for a week and cannot come up with a solution.
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Example (formula in F2 copied down and across):


Excel 2010
ABCDEFGH
1fruitquantityprice(each)123
2apples11.2apples1.210.9
3apples21oranges1.251.151.05
4apples30.9bananas0.950.90.85
5bananas10.95
6bananas20.9
7bananas30.85
8oranges11.25
9oranges21.15
10oranges31.05
Sheet5
Cell Formulas
RangeFormula
F2=INDEX($C$2:$C$10,MATCH(1,INDEX(($A$2:$A$10=$E2)*($B$2:$B$10=F$1),),FALSE))
 
Upvote 0

Forum statistics

Threads
1,223,246
Messages
6,170,996
Members
452,373
Latest member
TimReeks

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