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="width: 215"]
<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="width: 192"]
<TBODY>[TR]
[TD="class: xl65, width: 64, bgcolor: transparent"][/TD]
[TD="class: xl65, width: 64, bgcolor: transparent, align: right"]1
[/TD]
[TD="class: xl65, width: 64, bgcolor: transparent, align: right"]2
[/TD]
[TD="class: xl65, width: 64, bgcolor: transparent, align: right"]3
[/TD]
[/TR]
[TR]
[TD="class: xl65, bgcolor: transparent"]apples
[/TD]
[TD="class: xl65, bgcolor: transparent"]x
[/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="class: xl65, bgcolor: transparent"]oranges
[/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="class: xl65, bgcolor: transparent"]bananas
[/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[TD="class: 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

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Like this?
If you set up your cell references properly you can just enter the formula in the first cell and copy over and down.

This is an array formula and must be enter with CTRL-SHIFT-ENTER

Excel Workbook
ABCDEFGHIJK
1fruitquanityprice(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
11
Sheet1
 
Upvote 0
Please do not post your question more than one time... it is not very fair to the volunteers here when you do. For example, by the time AhoyNC posted his solution here, you had already indicated you had an acceptable answer in your other (duplicate) thread. Result... you ended up having AhoyNC waste his time developing an answer you no longer needed because he did not know you had posted your question twice. Not only is that not fair to AhoyNC, but is is also unfair to others seeking answers here (like you are doing) who AhoyNC could have devoted his time to instead. If you do not see the unfairness in that, assume someone else did what you did (posted your question twice) and it was your question AhoyNC did not devote his time to because that other person had him wasting his time developing a solution to a question that no longer needed an answer.
 
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