Sumproduct lookups

salahmost

Board Regular
Joined
Feb 19, 2007
Messages
68
Hi,

I have a sumproduct formula :
Code:
=SUMPRODUCT(SUMIF('Price List'!A2:A1400,Sales!C2:C5000,'Price List'!D2:D1400),Sales!H2:H5000)

This Formula gives me the sales amount depending on Price list sheet Where:
A2: A1400 is the item code in price list sheet
D4:D1400 is the price in price list sheet

C2:C5000 is the code for the sold items in Sales sheet.
H2:H5000 is the quantities of sold items in Sales sheet.
The good thing that I can add more criteria to this formula as getting sales for a specific company ....etc.
Now a new thing has come : sometimes a company issues a new purchase order for items with a different price .... I can add the same item code with this price to the price list ,and this P.O. number to sales ...How can I modify my formula to count the sales with items that have different prices for the the same product code?

Thank you
____________________________
Salah
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Hi,

Could you provide some sample data?
Where do you want the result displaying?


Excel Workbook
ABCD
1ID Number**Amount
2AA10000**368.00
3AA10001**277.00
4AA10002**474.00
5AA10003**163.00
6AA10004**330.00
7AA10005**346.00
8AA10006**472.00
9AA10007**343.00
10AA10008**300.00
11AA10009**343.00
12AA10010**100.00
13AA10011**150.00
14AA10012**147.00
15AA10013**267.00
16AA10014**458.00
17AA10015**436.00
Price List




Excel Workbook
CDEFGHI
1Sold ItemsQuantityValue of Sales
2AA1000151,385.00
3AA1000252,370.00
4AA100032326.00
5AA100042660.00
6AA100051346.00
7AA100061472.00
8AA1000751,715.00
9AA100082600.00
10AA100091343.00
11AA100102200.00
Sales



Ak
 
Last edited:
Upvote 0
Hi Salah,

Is it possible to add a "Helper" column to each sheet?

Excel Workbook
ABCDEF
1ID Number**Amount*Helper
2AA10000**300.00*AA10000-1
3AA10001**100.00*AA10001-1
4AA10002**400.00*AA10002-1
5AA10003**100.00*AA10003-1
6AA10004**300.00*AA10004-1
7AA10005**300.00*AA10005-1
8AA10006**400.00*AA10006-1
9AA10007**300.00*AA10007-1
10AA10008**300.00*AA10008-1
11AA10009**300.00*AA10009-1
12AA10010**100.00*AA10010-1
13AA10001**150.00*AA10001-2
14AA10012**150.00*AA10012-1
15AA10013**250.00*AA10013-1
16AA10014**450.00*AA10014-1
17AA10015**400.00*AA10015-1
Price List




Excel Workbook
CDEFGHIJK
1Sold Items****QuantityValue of Sales*Helper
2AA10000****51,500.00*AA10000-1
3AA10001****5500.00*AA10001-1
4AA10002****2800.00*AA10002-1
5AA10003****2200.00*AA10003-1
6AA10004****1300.00*AA10004-1
7AA10005****1300.00*AA10005-1
8AA10006****52,000.00*AA10006-1
9AA10007****2600.00*AA10007-1
10AA10008****1300.00*AA10008-1
11AA10009****2600.00*AA10009-1
12AA10010****4400.00*AA10010-1
13AA10001****4600.00*AA10001-2
14AA10012****4600.00*AA10012-1
15AA10013****41,000.00*AA10013-1
16AA10014****41,800.00*AA10014-1
17AA10015****52,000.00*AA10015-1
Sales



The formulas need to be copied down.

That's the only thing that comes to mind, sorry.

Ak
 
Upvote 0
Maybe this ?

Excel Workbook
ABCDEFGH
1Item-codePriceQTY.SalesItem of interestITME-1
2ITME-1$ 645.0025$16,125.00COUNT OF THIS4
3ITME-3$ 319.0033$10,527.00
4ITME-1$ 369.0029$10,701.00PriceQTY.Sales
5ITME-1$ 660.0020$13,200.00$ 645.0025$16,125.00
6ITME-3$ 734.0032$23,488.00$ 369.0029$10,701.00
7ITME-2$ 493.0032$15,776.00$ 660.0020$13,200.00
8ITME-2$ 246.0047$11,562.00$ 718.0027$19,386.00
9ITME-1$ 718.0027$19,386.00
10ITME-2$ 165.0040$ 6,600.00
11ITME-2$ 183.0045$ 8,235.00
Sheet2
 
Upvote 0
Thanks for your help.
The sales Sheet doesn't contain formulas and the desired result is obtained from 1 formula.
Here is the some sample data:
<b>Excel 2003</b><table cellpadding="2.5px" rules="all" style=";background-color: #FFFFFF;border: 1px solid;border-collapse: collapse; border-color: #A6AAB6"><colgroup><col width="25px" style="background-color: #E0E0F0" /><col /><col /><col /><col /><col /></colgroup><thead><tr style=" background-color: #E0E0F0;text-align: center;color: #161120"><th></th><th>A</th><th>B</th><th>C</th><th>D</th><th>E</th></tr></thead><tbody><tr ><td style="color: #161120;text-align: center;">1</td><td style="font-weight: bold;text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;color: #FFFFFF;background-color: #333399;;">Item Code</td><td style="font-weight: bold;text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;color: #FFFFFF;background-color: #333399;;">Item</td><td style="font-weight: bold;text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;color: #FFFFFF;background-color: #333399;;">Company</td><td style="font-weight: bold;text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;color: #FFFFFF;background-color: #333399;;">Price</td><td style="font-weight: bold;text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;color: #FFFFFF;background-color: #333399;;">PO</td></tr><tr ><td style="color: #161120;text-align: center;">2</td><td style="font-weight: bold;text-align: right;border-top: 1px solid black;color: #FF0000;;">205180001</td><td style="font-weight: bold;border-top: 1px solid black;color: #FF0000;;">Spoon KFC</td><td style="font-weight: bold;border-top: 1px solid black;color: #FF0000;;">KFC</td><td style="font-weight: bold;text-align: right;border-top: 1px solid black;color: #FF0000;;">1</td><td style="font-weight: bold;text-align: right;border-top: 1px solid black;color: #FF0000;;">2589</td></tr><tr ><td style="color: #161120;text-align: center;">3</td><td style="text-align: right;;">205180013</td><td style=";">Plastic Fork</td><td style=";">KFC</td><td style="text-align: right;;">1.5</td><td style="text-align: right;;">2595</td></tr><tr ><td style="color: #161120;text-align: center;">4</td><td style="text-align: right;;">205180003</td><td style=";">Baskin 5 inch Spoon</td><td style=";">KFC</td><td style="text-align: right;;">1.25</td><td style="text-align: right;;">2595</td></tr><tr ><td style="color: #161120;text-align: center;">5</td><td style="text-align: right;;">205180004</td><td style=";">Hardes Spoon</td><td style=";">KFC</td><td style="text-align: right;;">1.75</td><td style="text-align: right;;">2596</td></tr><tr ><td style="color: #161120;text-align: center;">6</td><td style="text-align: right;;">205103030</td><td style=";">Egg Tray Df40 </td><td style=";">Electro Lux</td><td style="text-align: right;;">1.8</td><td style="text-align: right;;">698789</td></tr><tr ><td style="color: #161120;text-align: center;">7</td><td style="text-align: right;;">205103031</td><td style=";">Freezer Shelf Gs</td><td style=";">Electro Lux</td><td style="text-align: right;;">6.5</td><td style="text-align: right;;">698801</td></tr><tr ><td style="color: #161120;text-align: center;">8</td><td style="text-align: right;;">205103032</td><td style=";">Frame For Shelf Glass Ref Df</td><td style=";">Electro Lux</td><td style="text-align: right;;">6.8</td><td style="text-align: right;;">698805</td></tr><tr ><td style="color: #161120;text-align: center;">9</td><td style="text-align: right;;">205103033</td><td style=";">Chilled Room Tray</td><td style=";">Electro Lux</td><td style="text-align: right;;">14.55</td><td style="text-align: right;;">698814</td></tr><tr ><td style="color: #161120;text-align: center;">10</td><td style="text-align: right;;">205103038</td><td style=";">Cover For Chill Without</td><td style=";">Electro Lux</td><td style="text-align: right;;">12</td><td style="text-align: right;;">698889</td></tr><tr ><td style="color: #161120;text-align: center;">11</td><td style="text-align: right;;">205103039</td><td style=";">Guard Variety B</td><td style=";">Electro Lux</td><td style="text-align: right;;">2.8</td><td style="text-align: right;;">698947</td></tr></tbody></table><p style="width:5.4em;font-weight:bold;margin:0;padding:0.2em 0.6em 0.2em 0.5em;border: 1px solid #A6AAB6;border-top:none;text-align: center;background-color: #E0E0F0;color: #161120">PriceList</p><br /><br />

Cannot add the changed price item to the price list as it will give a wrong result:
<b>Excel 2003</b><table cellpadding="2.5px" rules="all" style=";background-color: #FFFFFF;border: 1px solid;border-collapse: collapse; border-color: #A6AAB6"><colgroup><col width="25px" style="background-color: #E0E0F0" /><col /><col /><col /><col /><col /></colgroup><thead><tr style=" background-color: #E0E0F0;text-align: center;color: #161120"><th></th><th>A</th><th>B</th><th>C</th><th>D</th><th>E</th></tr></thead><tbody><tr ><td style="color: #161120;text-align: center;">1</td><td style="font-weight: bold;text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;color: #FFFFFF;background-color: #333399;;">Item Code</td><td style="font-weight: bold;text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;color: #FFFFFF;background-color: #333399;;">Item</td><td style="font-weight: bold;text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;color: #FFFFFF;background-color: #333399;;">Company</td><td style="font-weight: bold;text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;color: #FFFFFF;background-color: #333399;;">Price</td><td style="font-weight: bold;text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;color: #FFFFFF;background-color: #333399;;">PO</td></tr><tr ><td style="color: #161120;text-align: center;">2</td><td style="font-weight: bold;text-align: right;border-top: 1px solid black;color: #FF0000;;">205180001</td><td style="font-weight: bold;border-top: 1px solid black;color: #FF0000;;">Spoon KFC</td><td style="font-weight: bold;border-top: 1px solid black;color: #FF0000;;">KFC</td><td style="text-align: right;border-top: 1px solid black;;">1.25</td><td style="font-weight: bold;text-align: right;border-top: 1px solid black;color: #FF0000;;">2601</td></tr></tbody></table><p style="width:5.4em;font-weight:bold;margin:0;padding:0.2em 0.6em 0.2em 0.5em;border: 1px solid #A6AAB6;border-top:none;text-align: center;background-color: #E0E0F0;color: #161120">PriceList</p><br /><br />

<b>Excel 2003</b><table cellpadding="2.5px" rules="all" style=";background-color: #FFFFFF;border: 1px solid;border-collapse: collapse; border-color: #A6AAB6"><colgroup><col width="25px" style="background-color: #E0E0F0" /><col /><col /><col /><col /><col /><col /></colgroup><thead><tr style=" background-color: #E0E0F0;text-align: center;color: #161120"><th></th><th>A</th><th>B</th><th>C</th><th>D</th><th>E</th><th>F</th></tr></thead><tbody><tr ><td style="color: #161120;text-align: center;">1</td><td style="font-weight: bold;text-align: center;border-top: 1px solid black;border-bottom: 1px solid black;color: #0000FF;background-color: #FFFF99;;">Date</td><td style="font-weight: bold;text-align: center;border-top: 1px solid black;border-bottom: 1px solid black;color: #0000FF;background-color: #FFFF99;;">Item Code</td><td style="font-weight: bold;text-align: center;border-top: 1px solid black;border-bottom: 1px solid black;color: #0000FF;background-color: #FFFF99;;">Company</td><td style="font-weight: bold;text-align: center;border-top: 1px solid black;border-bottom: 1px solid black;color: #0000FF;background-color: #FFFF99;;">Item Name</td><td style="font-weight: bold;text-align: center;border-top: 1px solid black;border-bottom: 1px solid black;color: #0000FF;background-color: #FFFF99;;">Sold</td><td style="font-weight: bold;text-align: center;border-top: 1px solid black;border-bottom: 1px solid black;color: #0000FF;background-color: #FFFF99;;">PO</td></tr><tr ><td style="color: #161120;text-align: center;">2</td><td style="font-weight: bold;text-align: center;border-top: 1px solid black;border-bottom: 1px solid black;color: #FF0000;background-color: #FFFF99;;">11/04/04</td><td style="font-weight: bold;text-align: right;border-top: 1px solid black;border-bottom: 1px solid black;color: #FF0000;background-color: #FFFF99;;">205180001</td><td style="font-weight: bold;text-align: center;border-top: 1px solid black;border-bottom: 1px solid black;color: #FF0000;background-color: #FFFF99;;">KFC</td><td style="font-weight: bold;text-align: right;border-top: 1px solid black;border-bottom: 1px solid black;color: #FF0000;background-color: #FFFF99;;">Spoon KFC</td><td style="font-weight: bold;text-align: right;border-top: 1px solid black;border-bottom: 1px solid black;color: #FF0000;background-color: #FFFF99;;">250000</td><td style="font-weight: bold;text-align: right;border-top: 1px solid black;border-bottom: 1px solid black;color: #FF0000;background-color: #FFFF99;;">2589</td></tr><tr ><td style="color: #161120;text-align: center;">3</td><td style="font-weight: bold;text-align: center;border-top: 1px solid black;border-bottom: 1px solid black;color: #0000FF;background-color: #FFFF99;;">11/04/04</td><td style="font-weight: bold;text-align: right;border-top: 1px solid black;border-bottom: 1px solid black;color: #0000FF;background-color: #FFFF99;;">205180004</td><td style="font-weight: bold;text-align: center;border-top: 1px solid black;border-bottom: 1px solid black;color: #0000FF;background-color: #FFFF99;;">KFC</td><td style="font-weight: bold;text-align: right;border-top: 1px solid black;border-bottom: 1px solid black;color: #0000FF;background-color: #FFFF99;;">Hardes Spoon</td><td style="font-weight: bold;text-align: right;border-top: 1px solid black;border-bottom: 1px solid black;color: #0000FF;background-color: #FFFF99;;">30</td><td style="font-weight: bold;text-align: right;border-top: 1px solid black;border-bottom: 1px solid black;color: #0000FF;background-color: #FFFF99;;"></td></tr><tr ><td style="color: #161120;text-align: center;">4</td><td style="font-weight: bold;text-align: center;border-top: 1px solid black;border-bottom: 1px solid black;color: #0000FF;background-color: #FFFF99;;">11/04/06</td><td style="font-weight: bold;text-align: right;border-top: 1px solid black;border-bottom: 1px solid black;color: #0000FF;background-color: #FFFF99;;">205103039</td><td style="font-weight: bold;text-align: center;border-top: 1px solid black;border-bottom: 1px solid black;color: #0000FF;background-color: #FFFF99;;">Electro Lux</td><td style="font-weight: bold;text-align: right;border-top: 1px solid black;border-bottom: 1px solid black;color: #0000FF;background-color: #FFFF99;;">Guard Variety B</td><td style="font-weight: bold;text-align: right;border-top: 1px solid black;border-bottom: 1px solid black;color: #0000FF;background-color: #FFFF99;;">800</td><td style="font-weight: bold;text-align: right;border-top: 1px solid black;border-bottom: 1px solid black;color: #0000FF;background-color: #FFFF99;;"></td></tr><tr ><td style="color: #161120;text-align: center;">5</td><td style="font-weight: bold;text-align: center;border-top: 1px solid black;border-bottom: 1px solid black;color: #0000FF;background-color: #FFFF99;;">11/04/04</td><td style="font-weight: bold;text-align: right;border-top: 1px solid black;border-bottom: 1px solid black;color: #0000FF;background-color: #FFFF99;;">205180013</td><td style="font-weight: bold;text-align: center;border-top: 1px solid black;border-bottom: 1px solid black;color: #0000FF;background-color: #FFFF99;;">KFC</td><td style="font-weight: bold;text-align: right;border-top: 1px solid black;border-bottom: 1px solid black;color: #0000FF;background-color: #FFFF99;;">Plastic Fork</td><td style="font-weight: bold;text-align: right;border-top: 1px solid black;border-bottom: 1px solid black;color: #0000FF;background-color: #FFFF99;;">1200</td><td style="font-weight: bold;text-align: right;border-top: 1px solid black;border-bottom: 1px solid black;color: #0000FF;background-color: #FFFF99;;"></td></tr><tr ><td style="color: #161120;text-align: center;">6</td><td style="font-weight: bold;text-align: center;border-top: 1px solid black;border-bottom: 1px solid black;color: #0000FF;background-color: #FFFF99;;">11/04/04</td><td style="font-weight: bold;text-align: right;border-top: 1px solid black;border-bottom: 1px solid black;color: #0000FF;background-color: #FFFF99;;">205180003</td><td style="font-weight: bold;text-align: center;border-top: 1px solid black;border-bottom: 1px solid black;color: #0000FF;background-color: #FFFF99;;">KFC</td><td style="font-weight: bold;text-align: right;border-top: 1px solid black;border-bottom: 1px solid black;color: #0000FF;background-color: #FFFF99;;">Baskin 5 inch Spoon</td><td style="font-weight: bold;text-align: right;border-top: 1px solid black;border-bottom: 1px solid black;color: #0000FF;background-color: #FFFF99;;">2400</td><td style="font-weight: bold;text-align: right;border-top: 1px solid black;border-bottom: 1px solid black;color: #0000FF;background-color: #FFFF99;;"></td></tr><tr ><td style="color: #161120;text-align: center;">7</td><td style="font-weight: bold;text-align: center;border-top: 1px solid black;border-bottom: 1px solid black;color: #0000FF;background-color: #FFFF99;;">11/04/05</td><td style="font-weight: bold;text-align: right;border-top: 1px solid black;border-bottom: 1px solid black;color: #0000FF;background-color: #FFFF99;;">205103030</td><td style="font-weight: bold;text-align: center;border-top: 1px solid black;border-bottom: 1px solid black;color: #0000FF;background-color: #FFFF99;;">Electro Lux</td><td style="font-weight: bold;text-align: right;border-top: 1px solid black;border-bottom: 1px solid black;color: #0000FF;background-color: #FFFF99;;">Egg Tray Df40 </td><td style="font-weight: bold;text-align: right;border-top: 1px solid black;border-bottom: 1px solid black;color: #0000FF;background-color: #FFFF99;;">840</td><td style="font-weight: bold;text-align: right;border-top: 1px solid black;border-bottom: 1px solid black;color: #0000FF;background-color: #FFFF99;;"></td></tr><tr ><td style="color: #161120;text-align: center;">8</td><td style="font-weight: bold;text-align: center;border-top: 1px solid black;border-bottom: 1px solid black;color: #0000FF;background-color: #FFFF99;;">11/04/05</td><td style="font-weight: bold;text-align: right;border-top: 1px solid black;border-bottom: 1px solid black;color: #0000FF;background-color: #FFFF99;;">205103038</td><td style="font-weight: bold;text-align: center;border-top: 1px solid black;border-bottom: 1px solid black;color: #0000FF;background-color: #FFFF99;;">Electro Lux</td><td style="font-weight: bold;text-align: right;border-top: 1px solid black;border-bottom: 1px solid black;color: #0000FF;background-color: #FFFF99;;">Cover For Chill Without</td><td style="font-weight: bold;text-align: right;border-top: 1px solid black;border-bottom: 1px solid black;color: #0000FF;background-color: #FFFF99;;">680</td><td style="font-weight: bold;text-align: right;border-top: 1px solid black;border-bottom: 1px solid black;color: #0000FF;background-color: #FFFF99;;"></td></tr><tr ><td style="color: #161120;text-align: center;">9</td><td style="font-weight: bold;text-align: center;border-top: 1px solid black;border-bottom: 1px solid black;color: #0000FF;background-color: #FFFF99;;">11/04/04</td><td style="font-weight: bold;text-align: right;border-top: 1px solid black;border-bottom: 1px solid black;color: #0000FF;background-color: #FFFF99;;">205180004</td><td style="font-weight: bold;text-align: center;border-top: 1px solid black;border-bottom: 1px solid black;color: #0000FF;background-color: #FFFF99;;">KFC</td><td style="font-weight: bold;text-align: right;border-top: 1px solid black;border-bottom: 1px solid black;color: #0000FF;background-color: #FFFF99;;">Hardes Spoon</td><td style="font-weight: bold;text-align: right;border-top: 1px solid black;border-bottom: 1px solid black;color: #0000FF;background-color: #FFFF99;;">30</td><td style="font-weight: bold;text-align: right;border-top: 1px solid black;border-bottom: 1px solid black;color: #0000FF;background-color: #FFFF99;;"></td></tr><tr ><td style="color: #161120;text-align: center;">10</td><td style="font-weight: bold;text-align: center;border-top: 1px solid black;border-bottom: 1px solid black;color: #0000FF;background-color: #FFFF99;;">11/04/05</td><td style="font-weight: bold;text-align: right;border-top: 1px solid black;border-bottom: 1px solid black;color: #0000FF;background-color: #FFFF99;;">205103031</td><td style="font-weight: bold;text-align: center;border-top: 1px solid black;border-bottom: 1px solid black;color: #0000FF;background-color: #FFFF99;;">Electro Lux</td><td style="font-weight: bold;text-align: right;border-top: 1px solid black;border-bottom: 1px solid black;color: #0000FF;background-color: #FFFF99;;">Freezer Shelf Gs</td><td style="font-weight: bold;text-align: right;border-top: 1px solid black;border-bottom: 1px solid black;color: #0000FF;background-color: #FFFF99;;">380</td><td style="font-weight: bold;text-align: right;border-top: 1px solid black;border-bottom: 1px solid black;color: #0000FF;background-color: #FFFF99;;"></td></tr><tr ><td style="color: #161120;text-align: center;">11</td><td style="font-weight: bold;text-align: center;border-top: 1px solid black;border-bottom: 1px solid black;color: #FF0000;background-color: #FFFF99;;">11/04/05</td><td style="font-weight: bold;text-align: right;border-top: 1px solid black;border-bottom: 1px solid black;color: #FF0000;background-color: #FFFF99;;">205180001</td><td style="font-weight: bold;text-align: center;border-top: 1px solid black;border-bottom: 1px solid black;color: #FF0000;background-color: #FFFF99;;">KFC</td><td style="font-weight: bold;text-align: right;border-top: 1px solid black;border-bottom: 1px solid black;color: #FF0000;background-color: #FFFF99;;">Spoon KFC</td><td style="font-weight: bold;text-align: right;border-top: 1px solid black;border-bottom: 1px solid black;color: #FF0000;background-color: #FFFF99;;">300000</td><td style="font-weight: bold;text-align: right;border-top: 1px solid black;border-bottom: 1px solid black;color: #FF0000;background-color: #FFFF99;;">2601</td></tr><tr ><td style="color: #161120;text-align: center;">12</td><td style="font-weight: bold;text-align: center;border-top: 1px solid black;border-bottom: 1px solid black;color: #0000FF;background-color: #FFFF99;;">11/04/05</td><td style="font-weight: bold;text-align: right;border-top: 1px solid black;border-bottom: 1px solid black;color: #0000FF;background-color: #FFFF99;;">205103032</td><td style="font-weight: bold;text-align: center;border-top: 1px solid black;border-bottom: 1px solid black;color: #0000FF;background-color: #FFFF99;;">Electro Lux</td><td style="font-weight: bold;text-align: right;border-top: 1px solid black;border-bottom: 1px solid black;color: #0000FF;background-color: #FFFF99;;">Frame For Shelf Glass Ref Df</td><td style="font-weight: bold;text-align: right;border-top: 1px solid black;border-bottom: 1px solid black;color: #0000FF;background-color: #FFFF99;;">90</td><td style="font-weight: bold;text-align: right;border-top: 1px solid black;border-bottom: 1px solid black;color: #0000FF;background-color: #FFFF99;;"></td></tr><tr ><td style="color: #161120;text-align: center;">13</td><td style="font-weight: bold;text-align: center;border-top: 1px solid black;color: #0000FF;background-color: #FFFF99;;">11/04/05</td><td style="font-weight: bold;text-align: right;border-top: 1px solid black;color: #0000FF;background-color: #FFFF99;;">205103033</td><td style="font-weight: bold;text-align: center;border-top: 1px solid black;color: #0000FF;background-color: #FFFF99;;">Electro Lux</td><td style="font-weight: bold;text-align: right;border-top: 1px solid black;color: #0000FF;background-color: #FFFF99;;">Chilled Room Tray</td><td style="font-weight: bold;text-align: right;border-top: 1px solid black;color: #0000FF;background-color: #FFFF99;;">560</td><td style="font-weight: bold;text-align: right;border-top: 1px solid black;color: #0000FF;background-color: #FFFF99;;"></td></tr></tbody></table><p style="width:3em;font-weight:bold;margin:0;padding:0.2em 0.6em 0.2em 0.5em;border: 1px solid #A6AAB6;border-top:none;text-align: center;background-color: #E0E0F0;color: #161120">Sales</p><br /><br />

Formula:
=SUMPRODUCT(SUMIF(A2:A11,Sales!B2:B13,D2:D11),Sales!E2:E13)

Result before Item "Spoon KFC" price change: 578047

Thank you
 
Upvote 0
Hi Salah,

I still don't know where or how you want to display your result.
Is this what you require?.....

Excel Workbook
ABCDEF
1DateItem CodeCompanyItem NameSoldPO
211/04/2004205180001KFCSpoon KFC2500002589
311/04/2004205180004KFCHardes Spoon302596
411/04/2006205103039Electro LuxGuard Variety B800698947
511/04/2004205180013KFCPlastic Fork12002595
611/04/2004205180003KFCBaskin 5 inch Spoon24002595
711/04/2005205103030Electro LuxEgg Tray Df40840698789
811/04/2005205103038Electro LuxCover For Chill Without680698889
911/04/2004205180004KFCHardes Spoon302596
1011/04/2005205103031Electro LuxFreezer Shelf Gs380698801
1111/04/2005205180001KFCSpoon KFC3000002601
1211/04/2005205103032Electro LuxFrame For Shelf Glass Ref Df90698805
1311/04/2005205103033Electro LuxChilled Room Tray560698814
Sales





Excel Workbook
ABCDEF
1Item CodeItemCompanyPricePOResult
2205180001Spoon KFCKFC12589250000
3205180013Plastic ForkKFC1.525951800
4205180003Baskin 5 inch SpoonKFC1.2525953000
5205180004Hardes SpoonKFC1.752596105
6205103030Egg Tray Df40Electro Lux1.86987891512
7205103031Freezer Shelf GsElectro Lux6.56988012470
8205103032Frame For Shelf Glass Ref DfElectro Lux6.8698805612
9205103033Chilled Room TrayElectro Lux14.556988148148
10205103038Cover For Chill WithoutElectro Lux126988898160
11205103039Guard Variety BElectro Lux2.86989472240
12205180001KFCSpoon KFC1.252601375000
PriceList



I hope that works for you, if not, take a look here.....

http://www.youtube.com/user/ExcelIsFun#p/search/43/yQv2QFlbzCI

Ak
 
Upvote 0
Thanks again for your help
My original formula calculate the sold items( many different items) ( Not all the items in Price list)...In one formula ( In another sheet not sales or priceList sheet)
for each sold items multiplied by its lookup price to give you the total ) the item maybe mentioned more than 1 time.
please review my sample data, The problem occurs when the price changed for some items!
so the changed items have more than 1 lookup.

Thanks

Salah
 
Upvote 0
Have you tried to modify this formula?

=SUMPRODUCT((Sales!$B$2:$B$13=A2)*(Sales!$F$2:$F$13=E2)*Sales!$E$2:$E$13)*D2

It is checking if the Item code and PO number are in the Sales range.
Then it adds up the number of Items sold then multiplies the rest by the Price.

I'm sorry if this isn't the solution you require.
To get the result you require, I suggest that you post a sample of you expected result to compliment the sample data you have already provided.

Ak
 
Upvote 0

Forum statistics

Threads
1,224,517
Messages
6,179,234
Members
452,898
Latest member
Capolavoro009

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