Three way lookup (1 row, two columns)

vijayamani1987

New Member
Joined
Mar 16, 2014
Messages
32
Here is my requirement...


Oct-13Nov-13Dec-13
Item nameCostMRPQtyCostMRPQtyCostMRPQty
clip 202532530 51830 6
stone clip 708027590 46590 8
oval clip 607216075 06080 2

<tbody>
</tbody>

I need to find the MRP value of stone clip for nov-13.

I am not much familiar with excel. Please give me a solution and thanks a lot in advance...
 
Hi Aladin Akyurek,
while using ur formula i got an error
G2
=SUMPRODUCT(--(TEXT($A$2:$A$8,"mmmyy")=TEXT(G2,"mmmyy")),--($B$2:$B$8=G3),$C$2:$C$8,$D$2:$D$8)

I think this is bcoz in G2 my input is 1/02/2014, but i formated it to FEB 14.I am not clear that how do we compare the month and year of (A2:A8) = month and year of (G2)

If A2:A8 and G2 are true (not text) dates, TEXT transformation will succeed. In G2 one would expect a month/year specification using a first day date, like 1-Feb-14.

What error did you get? By the way, it's important to have the right formatting string: mmmyy stands for month and year. In French for example, this would be different.
 
Upvote 0

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Hi Aladin Akyurek,
while using ur formula i got an error
G2
=SUMPRODUCT(--(TEXT($A$2:$A$8,"mmmyy")=TEXT(G2,"mmmyy")),--($B$2:$B$8=G3),$C$2:$C$8,$D$2:$D$8)

I think this is bcoz in G2 my input is 1/02/2014, but i formated it to FEB 14.I am not clear that how do we compare the month and year of (A2:A8) = month and year of (G2)
Hi Vijayamani1987,

Did you try my formulas of the post #29?. Look at this:

DATENAMEMRPQTY
11/02/2014CLIP55DATEfev 14
18/02/2014CLIP57NAMECLIPFormulas
28/02/2014RING164TOTAL108=SUM(INDEX((B2:B8=G3)*(A2:A8-DAY(A2:A8)=G2-DAY(G2))*C2:C8*D2:D8,))
03/04/2014RING142TOTAL108=SUM((B2:B8=G3)*(A2:A8-DAY(A2:A8)=G2-DAY(G2))*C2:C8*D2:D8)
14/04/2014RING202
22/02/2014CLIP86
06/04/2014CLIP74
**************************************************************************************************************

<tbody>
</tbody>

PS: fev is feb.

Markmzz
 
Upvote 0
If A2:A8 and G2 are true (not text) dates, TEXT transformation will succeed. In G2 one would expect a month/year specification using a first day date, like 1-Feb-14.

What error did you get? By the way, it's important to have the right formatting string: mmmyy stands for month and year. In French for example, this would be different.

And if G2 is text (not a number)...
Rich (BB code):
=SUMPRODUCT(     
  --(TEXT($A$2:$A$8,"mmmyy")=G2),     
  --($B$2:$B$8=G3),     
  $C$2:$C$8,     
  $D$2:$D$8)
will succeed as intended.
 
Upvote 0
Hi Vijayamani1987,

I forgot a important information (in red).

DATENAMEMRPQTY
11/02/2014CLIP55 DATEfev 14
18/02/2014CLIP57 NAMECLIPFor the formula below use Enter to enter the formula
28/02/2014RING164 TOTAL108=SUM(INDEX((B2:B8=G3)*(A2:A8-DAY(A2:A8)=G2-DAY(G2))*C2:C8*D2:D8,))
03/04/2014RING142 TOTAL108=SUM((B2:B8=G3)*(A2:A8-DAY(A2:A8)=G2-DAY(G2))*C2:C8*D2:D8)
14/04/2014RING202 For the formula above use Ctrl+Shift+Enter to enter the formula
22/02/2014CLIP86
06/04/2014CLIP74
**************************************************************************************************************
<colgroup><col width="63" style="width: 47pt; mso-width-source: userset; mso-width-alt: 2304;"> <col width="37" style="width: 28pt; mso-width-source: userset; mso-width-alt: 1353;" span="2"> <col width="27" style="width: 20pt; mso-width-source: userset; mso-width-alt: 987;"> <col width="17" style="width: 13pt; mso-width-source: userset; mso-width-alt: 621;"> <col width="42" style="width: 32pt; mso-width-source: userset; mso-width-alt: 1536;"> <col width="47" style="width: 35pt; mso-width-source: userset; mso-width-alt: 1718;"> <col width="353" style="width: 265pt; mso-width-source: userset; mso-width-alt: 12909;"> <tbody> </tbody>


Markmzz
 
Upvote 0
I tried all ur formula still i end with #value error. how can I upload my excel sheet here? or can anybody give me ur mail id? i will mail u my excel sheet?
 
Last edited:
Upvote 0
Last edited:
Upvote 0
Upvote 0

Forum statistics

Threads
1,216,246
Messages
6,129,700
Members
449,528
Latest member
Paula03

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