Index/ match and match??

Tina Do

New Member
Joined
Oct 2, 2019
Messages
3
Hi everyone,

Appreciate if you can advise the formula that is applicable for this scenario.


1. Sheet 1 - table 1
This table shows the price of apples at different minimum order qty (MOQ) in Q2

Types of appleMOQ 1Unit price 1MOQ 2Unit price 2MOQ 3Unit price 3
Apple 15002.4110001.9220001.62
Apple 2 501.651001.3620001.26
Apple 3301.73601.46901.27
Apple 42503.505003.2010002.82
Apple 52502.135001.8410001.46
Apple 610001.7820001.5830001.29
Apple 72501.655001.3610001.26

<tbody>
</tbody>


2. Sheet 2 - table 2

This table shows the price of apples at different MOQ in Q3 and I need to match them against apple type and MOQ in Q2 to to retrieve the price from sheet 1 - table 1.

Note that the rows are not in sequence as in table 1 and the MOQ may be different from table 1.


Types of appleMOQ 1Unit price 1 - Q3Unit price 1 - Q2MOQ 2Unit price 2 - Q3Unit price 1 - Q2MOQ 3Unit price 3 - Q3Unit price 3 - Q2
Apple 42501.92??10002.82??
Apple 15001.92??10001.62??20001.59??
Apple 610001.78??20001.58??30001.29??
Apple 21001.36??20001.26??
Apple 3601.46??901.25??

<tbody>
</tbody>

I need to input formula to get the Q2 price in all "??" column. Could anyone help me please? I was not able successful with index and match/ match function. Thanks.
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Assuming your data starts in A1, how about
=INDEX(Sheet1!$B$2:$G$8,MATCH($A2,Sheet1!$A$2:$A$8,0),MATCH(LEFT($D$1,FIND(" -",$D$1)-1),Sheet1!$B$1:$G$1,0))
 
Upvote 0
Hi Fluff,

Apologize but what if the table 2 is in below format? What should be the formula? Thanks.



After
Before

After
Before

After
Before
Types of apple
MOQ 1
Unit price 1
Unit price 1
MOQ 2
Unit price 2
Unit price 1
MOQ 3
Unit price 3
Unit price 3
Apple 4
250
1.92
??
1000
2.82
??
Apple 1
500
1.92
??
1000
1.62
??
2000
1.59
??
Apple 6
1000
1.78
??
2000
1.58
??
3000
1.29
??
Apple 2
100
1.36
??
2000
1.26
??
Apple 3
60
1.46
??
90
1.25
??

<tbody>
</tbody>
 
Upvote 0
How about
=INDEX(Sheet1!$B$2:$G$8,MATCH($A2,Sheet1!$A$2:$A$8,0),MATCH($D$1,Sheet1!$B$1:$G$1,0))
 
Upvote 0
Hi Fluff, your formula doesn't take into consideration of the MOQ. For example, that formula will return the price for Apple 2/ unit price 1 as 1.65. But that is wrong because 1.65 is the price for MOQ 50, not 100 which is the first MOQ of Apple 2 in table 2.

Would you be able to advise a formula that can take into consideration of the MOQ? Thanks.
 
Upvote 0
Maybe
=INDEX(Sheet1!$B$2:$G$8,MATCH($A2,Sheet1!$A$2:$A$8,0),MATCH($D$1,Sheet1!$B$1:$G$1,0))/INDEX(Sheet1!$B$2:$G$8,MATCH($A2,Sheet1!$A$2:$A$8,0),MATCH($D$1,Sheet1!$B$1:$G$1,0)-1)*B2
 
Upvote 0

Forum statistics

Threads
1,214,606
Messages
6,120,479
Members
448,967
Latest member
visheshkotha

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