Average sales quantity with conditions

kmonkmol

Board Regular
Joined
Mar 13, 2014
Messages
50
Hi Sir
Please note following Table i have data of One Month Sales and return quantity and Price, I need Show Monday AVERAGE Net Sales Quantity(Sales minus Return) with condition(if Customer code, Item Code) is Same

[TABLE="width: 679"]
<tbody>[TR]
[TD]TRANScode[/TD]
[TD]DATE[/TD]
[TD]CST CODE[/TD]
[TD]ITEM CODE[/TD]
[TD]SALES QTY[/TD]
[TD]SALES PRICE[/TD]
[TD]RTN QTY[/TD]
[TD]RTN PRICE[/TD]
[/TR]
[TR]
[TD]SALES[/TD]
[TD="align: right"]01-09-2017[/TD]
[TD]ALM2118[/TD]
[TD]A1003[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]8.4[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]SALES[/TD]
[TD="align: right"]01-09-2017[/TD]
[TD]ALM2118[/TD]
[TD]A1002[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]16.2[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]SALES[/TD]
[TD="align: right"]01-09-2017[/TD]
[TD]ALM1685[/TD]
[TD]A1003[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]8.4[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]SALES[/TD]
[TD="align: right"]01-09-2017[/TD]
[TD]ALM1685[/TD]
[TD]A1002[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]8.1[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]SALES[/TD]
[TD="align: right"]02-09-2017[/TD]
[TD]ALM1685[/TD]
[TD]A1002[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]16.2[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]SALES[/TD]
[TD="align: right"]02-09-2017[/TD]
[TD]ALM1685[/TD]
[TD]A1003[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]8.4[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]SALES[/TD]
[TD="align: right"]02-09-2017[/TD]
[TD]WZS1020F[/TD]
[TD]A1002[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]16.5[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]SALES[/TD]
[TD="align: right"]02-09-2017[/TD]
[TD]WZS1020F[/TD]
[TD]A1003[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]17.5[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]SALES[/TD]
[TD="align: right"]02-09-2017[/TD]
[TD]ALM2118[/TD]
[TD]A1002[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]16.2[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]SALES[/TD]
[TD="align: right"]02-09-2017[/TD]
[TD]ALM2118[/TD]
[TD]A1003[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]16.8[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]SALES[/TD]
[TD="align: right"]03-09-2017[/TD]
[TD]ALM1685[/TD]
[TD]A1002[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]16.2[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]SALES[/TD]
[TD="align: right"]03-09-2017[/TD]
[TD]ALM2118[/TD]
[TD]A1002[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]16.2[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]SALES[/TD]
[TD="align: right"]03-09-2017[/TD]
[TD]ALM2118[/TD]
[TD]A1003[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]8.4[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]SALES[/TD]
[TD="align: right"]03-09-2017[/TD]
[TD]WZS1020F[/TD]
[TD]A1002[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]16.5[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]SALES[/TD]
[TD="align: right"]03-09-2017[/TD]
[TD]WZS1020F[/TD]
[TD]A1003[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]17.5[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]SALES[/TD]
[TD="align: right"]04-09-2017[/TD]
[TD]WZS1020F[/TD]
[TD]A1002[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]8.25[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]SALES[/TD]
[TD="align: right"]04-09-2017[/TD]
[TD]WZS1020F[/TD]
[TD]A1003[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]8.75[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]SALES[/TD]
[TD="align: right"]04-09-2017[/TD]
[TD]ALM2118[/TD]
[TD]A1003[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]8.4[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]SALES[/TD]
[TD="align: right"]05-09-2017[/TD]
[TD]WZS1020F[/TD]
[TD]A1002[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]16.5[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]SALES[/TD]
[TD="align: right"]05-09-2017[/TD]
[TD]WZS1020F[/TD]
[TD]A1003[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]8.75[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]SALES[/TD]
[TD="align: right"]05-09-2017[/TD]
[TD]ALM1685[/TD]
[TD]A1002[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]8.1[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]SALES[/TD]
[TD="align: right"]05-09-2017[/TD]
[TD]ALM2118[/TD]
[TD]A1002[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]16.2[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]SALES[/TD]
[TD="align: right"]05-09-2017[/TD]
[TD]ALM2118[/TD]
[TD]A1003[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]8.4[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]SALES[/TD]
[TD="align: right"]03-09-2017[/TD]
[TD]ZOM4002[/TD]
[TD]A1002[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]8.25[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]SALES[/TD]
[TD="align: right"]05-09-2017[/TD]
[TD]ZOM4002[/TD]
[TD]A1002[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]8.25[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]RETURN[/TD]
[TD="align: right"]01-09-2017[/TD]
[TD]ALM2118[/TD]
[TD]A1003[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]16.8[/TD]
[/TR]
[TR]
[TD]RETURN[/TD]
[TD="align: right"]01-09-2017[/TD]
[TD]ALM1685[/TD]
[TD]A1002[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]8.1[/TD]
[/TR]
[TR]
[TD]RETURN[/TD]
[TD="align: right"]02-09-2017[/TD]
[TD]ALM2118[/TD]
[TD]A1002[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]8.1[/TD]
[/TR]
[TR]
[TD]RETURN[/TD]
[TD="align: right"]02-09-2017[/TD]
[TD]ALM2118[/TD]
[TD]A1003[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]8.4[/TD]
[/TR]
[TR]
[TD]RETURN[/TD]
[TD="align: right"]05-09-2017[/TD]
[TD]ALM1685[/TD]
[TD]A1003[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]8.4[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Maybe something like this:
This is an array formula and must be entered with CTRL-SHIFT-ENTER.
Excel Workbook
ABCDEFGHIJKLM
1TRANScodeDATECST CODEITEM CODESALES QTYSALES PRICERTN QTYRTN PRICEDayCSTItemAverage
2SALES9/1/2017ALM2118A100318.400MondayWZS1020FA10028.25
3SALES9/1/2017ALM2118A1002216.200MondayALM2118A10038.4
4SALES9/1/2017ALM1685A100318.400
5SALES9/1/2017ALM1685A100218.100
6SALES9/2/2017ALM1685A1002216.200
7SALES9/2/2017ALM1685A100318.400
8SALES9/2/2017WZS1020FA1002216.500
9SALES9/2/2017WZS1020FA1003217.500
10SALES9/2/2017ALM2118A1002216.200
11SALES9/2/2017ALM2118A1003216.800
12SALES9/3/2017ALM1685A1002216.200
13SALES9/3/2017ALM2118A1002216.200
14SALES9/3/2017ALM2118A100318.400
15SALES9/3/2017WZS1020FA1002216.500
16SALES9/3/2017WZS1020FA1003217.500
17SALES9/4/2017WZS1020FA100218.2500
18SALES9/4/2017WZS1020FA100318.7500
19SALES9/4/2017ALM2118A100318.400
20SALES9/5/2017WZS1020FA1002216.500
21SALES9/5/2017WZS1020FA100318.7500
22SALES9/5/2017ALM1685A100218.100
23SALES9/5/2017ALM2118A1002216.200
24SALES9/5/2017ALM2118A100318.400
25SALES9/3/2017ZOM4002A100218.2500
26SALES9/5/2017ZOM4002A100218.2500
27RETURN9/1/2017ALM2118A100300216.8
28RETURN9/1/2017ALM1685A10020018.1
29RETURN9/2/2017ALM2118A10020018.1
30RETURN9/2/2017ALM2118A10030018.4
31RETURN9/5/2017ALM1685A10030018.4
Sheet
 
Upvote 0
Solution
This formula is work for me Thank You Very much.
The marked solution has been changed accordingly. In your future questions, please mark the post as the solution that actually answered your question, instead of your feedback message as it will help future readers. No further action is required for this thread.
 
Upvote 0

Forum statistics

Threads
1,224,045
Messages
6,176,051
Members
452,701
Latest member
rfhandel

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