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...
 
Thank you everyone of you...
Now I am here with a new problem

ABCDEFG
1DateNameQty
21/03/13Clip5Date01/03/13
316/03/13Pen9NameClip
412/01/13Pen4Total Qty12
524/02/13Pen2
61/01/13Clip3
711/12/12Clip2
828/3/13Clip7
919/12/12Pen6

<tbody>
</tbody>

As shown in the above table, in Cell "F4", I need a formula which will sum column "C" based on the required values from column "A & B", Cell "F2" and column "A" should have the same month & year ( no need for same date in "F2" & column "A").

I have tried this formula. But it gives =0.

F4=sumifs(c2:c9,A2:A9,"="&F2,B2:B9,"="&F3)

Please correct my formula or suggest a good one.
 
Upvote 0

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Thank you everyone of you...
Now I am here with a new problem

ABCDEFG
1DateNameQty
21/03/13Clip5Date01/03/13
316/03/13Pen9NameClip
412/01/13Pen4Total Qty12
524/02/13Pen2
61/01/13Clip3
711/12/12Clip2
828/3/13Clip7
919/12/12Pen6

<tbody>
</tbody>

As shown in the above table, in Cell "F4", I need a formula which will sum column "C" based on the required values from column "A & B", Cell "F2" and column "A" should have the same month & year ( no need for same date in "F2" & column "A").

I have tried this formula. But it gives =0.

F4=sumifs(c2:c9,A2:A9,"="&F2,B2:B9,"="&F3)

Please correct my formula or suggest a good one.

Try...

=SUMIFS(C2:C9,B2:B9,F3,A2:A9,">="&F2,A2:A9,"<="&EOMONTH(F2,0))
 
Upvote 0
Thank you everyone of you...
Now I am here with a new problem

ABCDEFG
1DateNameQty
21/03/13Clip5Date01/03/13
316/03/13Pen9NameClip
412/01/13Pen4Total Qty12
524/02/13Pen2
61/01/13Clip3
711/12/12Clip2
828/3/13Clip7
919/12/12Pen6

<tbody>
</tbody>

As shown in the above table, in Cell "F4", I need a formula which will sum column "C" based on the required values from column "A & B", Cell "F2" and column "A" should have the same month & year ( no need for same date in "F2" & column "A").

I have tried this formula. But it gives =0.

F4=sumifs(c2:c9,A2:A9,"="&F2,B2:B9,"="&F3)

Please correct my formula or suggest a good one.

You can try this too:

Code:
=SUMPRODUCT(-(B2:B9=F3),-(TEXT(A2:A9,"mmyy")=TEXT(F2,"mmyy")),C2:C9)

Markmzz
 
Upvote 0
Hi friends,
Here is my next problem.

ABCDEFGH
1DATENAMEMRPQTY
211/02/14CLIP55DATEFEB 14
318/02/14CLIP57NAMECLIP
429/02/14RING164TOTAL108
503/04/14RING142
614/04/14RING202
722/02/14CLIP86
806/04/14CLIP74
9
10

<tbody>
</tbody>

here, the MRP of the product wont be same for the same day. It will vary to each customer. So in total (G4), I want the sum by multiplying each quantity in the suitable row with the corresponding MRP and sum it for the required month.

I can do it by multiplying C & D column as default and can use those values in sumifs formula.

Is there any other way to find the G4 value? Thanks in advance for the help.
 
Upvote 0
Hi friends,
Here is my next problem.

ABCDEFGH
1DATENAMEMRPQTY
211/02/14CLIP55DATEFEB 14
318/02/14CLIP57NAMECLIP
429/02/14RING164TOTAL108
503/04/14RING142
614/04/14RING202
722/02/14CLIP86
806/04/14CLIP74
9
10

<tbody>
</tbody>

here, the MRP of the product wont be same for the same day. It will vary to each customer. So in total (G4), I want the sum by multiplying each quantity in the suitable row with the corresponding MRP and sum it for the required month.

I can do it by multiplying C & D column as default and can use those values in sumifs formula.

Is there any other way to find the G4 value? Thanks in advance for the help.

Try...
Rich (BB code):
=SUMPRODUCT(
    --(TEXT($A$2:$A$8,"mmmyy")=TEXT(G2,"mmmyy")),
    --($B$2:$B$8=G3),
    $C$2:$C$8,
    $D$2:$D$8)
 
Upvote 0
Hi friends,
Here is my next problem.

ABCDEFGH
1DATENAMEMRPQTY
211/02/14CLIP55DATEFEB 14
318/02/14CLIP57NAMECLIP
429/02/14RING164TOTAL108
503/04/14RING142
614/04/14RING202
722/02/14CLIP86
806/04/14CLIP74
9
10

<tbody>
</tbody>

here, the MRP of the product wont be same for the same day. It will vary to each customer. So in total (G4), I want the sum by multiplying each quantity in the suitable row with the corresponding MRP and sum it for the required month.

I can do it by multiplying C & D column as default and can use those values in sumifs formula.

Is there any other way to find the G4 value? Thanks in advance for the help.

Try this too:

Code:
Use Ctrl+Shift+Enter to enter the formula

=SUM((B2:B8=G3)*(A2:A8-DAY(A2:A8)=G2-DAY(G2))*C2:C8*D2:D8)

Or

Use Enter to enter the formula

=SUM(INDEX((B2:B8=G3)*(A2:A8-DAY(A2:A8)=G2-DAY(G2))*C2:C8*D2:D8,))

Markmzz
 
Upvote 0
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)
 
Upvote 0

Forum statistics

Threads
1,216,077
Messages
6,128,685
Members
449,463
Latest member
Jojomen56

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