Lookpup value

ziad alsayed

Well-known Member
Joined
Jul 17, 2010
Messages
665
dear all

i am trying to lookup value from one sheet to another base on two condition (Year and Item). below is the data i need to put the price in first table based on the data in the second table

table 1
Excel Workbook
ABCDE
1BranchYearItemQtyUnit Price
2PHC2008Big Diary800
3PHC2009Big Diary800
4PHC2010Big Diary700
5PHC2011Big Diary650
6PHC2012Big Diary500
7PHC2008Small Diary500
8PHC2009Small Diary500
9PHC2010Small Diary400
10PHC2011Small Diary300
11PHC2012Small Diary0
12PHC2008Table Pad700
13PHC2009Table Pad700
14PHC2010Table Pad600
Data
Excel 2010


table 2
Excel Workbook
ABCDEF
120082009201020112012
2Dollar rate150150150150150
3Big Diary$4.50$4.50$5.00$5.50$5.50
4Small Diary$1.50$1.50$1.50$1.80$1.80
5Table Pad$1.20$1.20$1.20$1.40$1.40
6Table Calender$1.00$1.00$1.00$1.10$1.10
7Greeting Cards$0.50$0.50$0.50$0.50$0.50
8Wine Sets$35.00$40.00$42.00$45.00$45.00
Prices
Excel 2010


hope you can assist.
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
dear all

i am trying to lookup value from one sheet to another base on two condition (Year and Item). below is the data i need to put the price in first table based on the data in the second table

table 1
Excel Workbook
ABCDE
1BranchYearItemQtyUnit Price
2PHC2008Big Diary800
3PHC2009Big Diary800
4PHC2010Big Diary700
5PHC2011Big Diary650
6PHC2012Big Diary500
7PHC2008Small Diary500
8PHC2009Small Diary500
9PHC2010Small Diary400
10PHC2011Small Diary300
11PHC2012Small Diary0
12PHC2008Table Pad700
13PHC2009Table Pad700
14PHC2010Table Pad600
Data
Excel 2010


table 2
Excel Workbook
ABCDEF
120082009201020112012
2Dollar rate150150150150150
3Big Diary$4.50$4.50$5.00$5.50$5.50
4Small Diary$1.50$1.50$1.50$1.80$1.80
5Table Pad$1.20$1.20$1.20$1.40$1.40
6Table Calender$1.00$1.00$1.00$1.10$1.10
7Greeting Cards$0.50$0.50$0.50$0.50$0.50
8Wine Sets$35.00$40.00$42.00$45.00$45.00
Prices
Excel 2010


hope you can assist.
Sheet1, E2, copy down:

=INDEX(Sheet2!$B$3:$F$8,MATCH(C2,Sheet2!$A$2:$A$8,0),MATCH(B2,Sheet2!$B$1:$F$1,0))
 
Upvote 0
thanks aladin ,this is perfect,...

You are welcome. Thanks for providing feedback.

...please can you explain it.

INDEX, in order to return a value from the result range it's given, needs the vertical position and the horizontal position of that value.

In the suggested formula:

=INDEX(Sheet2!$B$3:$F$8,MATCH(C2,Sheet2!$A$2:$A$8,0),MATCH(B2,Sheet2!$B$1:$F$1,0))

Sheet2!$B$3:$F$8 is the result range;

MATCH(C2,Sheet2!$A$2:$A$8,0) calculates the vertical position; and

MATCH(B2,Sheet2!$B$1:$F$1,0) calculates the horizontal position.

The cell in Sheet2!$B$3:$F$8 is where the two positions meet/intersect
 
Upvote 0

Forum statistics

Threads
1,224,522
Messages
6,179,293
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