Using sumproduct for specific dates

donjr

New Member
Joined
May 29, 2013
Messages
13
Hello, I've done some searches and cannot find a thread to help me.

I'm trying to calculate average commission in column L (=SUMPRODUCT(B3:B17,E3:E17)/SUM(B3:B17))
But have it only use the dates between column I and J. I need advice on to create a statement that says SUMPRODUCT IF the data in column B and E falls withing the dates in columns I and J.

Any and all help is appreciated.


[TABLE="width: 500"]
<tbody>[TR]
[TD][TABLE="width: 922"]
<tbody>[TR]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[TD="align: center"]D[/TD]
[TD="align: center"]E[/TD]
[TD="align: center"]F[/TD]
[TD="align: center"]G[/TD]
[TD="align: center"]H[/TD]
[TD="align: center"]I[/TD]
[TD="align: center"]J[/TD]
[TD="align: center"]K[/TD]
[TD="align: center"]L[/TD]
[TD="align: center"]M[/TD]
[/TR]
[TR]
[TD="align: center"]Date[/TD]
[TD="align: center"]Qty[/TD]
[TD="align: center"]Stock[/TD]
[TD="align: center"]Price[/TD]
[TD="align: center"]Commission[/TD]
[TD="align: center"]$[/TD]
[TD="align: center"][/TD]
[TD="align: center"]Totals[/TD]
[TD="align: center"]Start[/TD]
[TD="align: center"]End[/TD]
[TD="align: center"]Qty[/TD]
[TD="align: center"]Avg Commission[/TD]
[TD="align: center"]$[/TD]
[/TR]
[TR]
[TD="align: center"]7/2/14[/TD]
[TD="align: center"]15,000[/TD]
[TD="align: center"]X[/TD]
[TD="align: center"]24.565[/TD]
[TD="align: center"]0.01[/TD]
[TD="align: center"]$150[/TD]
[TD="align: center"][/TD]
[TD="align: center"]Jul-14[/TD]
[TD="align: center"]7/2/14[/TD]
[TD="align: center"]7/31/14[/TD]
[TD="align: center"]202,000[/TD]
[TD="align: center"]0.01[/TD]
[TD="align: center"]$2,620[/TD]
[/TR]
[TR]
[TD="align: center"]7/3/14[/TD]
[TD="align: center"]5,500[/TD]
[TD="align: center"]X[/TD]
[TD="align: center"]24.565[/TD]
[TD="align: center"]0.01[/TD]
[TD="align: center"]$55[/TD]
[TD="align: center"][/TD]
[TD="align: center"]Aug-14[/TD]
[TD="align: center"]8/1/14[/TD]
[TD="align: center"]8/31/14[/TD]
[TD="align: center"]821,385[/TD]
[TD="align: center"][/TD]
[TD="align: center"]$0[/TD]
[/TR]
[TR]
[TD="align: center"]7/10/14[/TD]
[TD="align: center"]25,000[/TD]
[TD="align: center"]X[/TD]
[TD="align: center"]24.565[/TD]
[TD="align: center"]0.01[/TD]
[TD="align: center"]$250[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]7/23/14[/TD]
[TD="align: center"]20,000[/TD]
[TD="align: center"]X[/TD]
[TD="align: center"]24.565[/TD]
[TD="align: center"]0.01[/TD]
[TD="align: center"]$200[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]7/23/14[/TD]
[TD="align: center"]20,000[/TD]
[TD="align: center"]X[/TD]
[TD="align: center"]24.565[/TD]
[TD="align: center"]0.01[/TD]
[TD="align: center"]$200[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]7/24/14[/TD]
[TD="align: center"]10,000[/TD]
[TD="align: center"]X[/TD]
[TD="align: center"]24.565[/TD]
[TD="align: center"]0.01[/TD]
[TD="align: center"]$100[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]7/25/14[/TD]
[TD="align: center"]10,000[/TD]
[TD="align: center"]X[/TD]
[TD="align: center"]24.565[/TD]
[TD="align: center"]0.01[/TD]
[TD="align: center"]$100[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]7/25/14[/TD]
[TD="align: center"]5,000[/TD]
[TD="align: center"]X[/TD]
[TD="align: center"]24.565[/TD]
[TD="align: center"]0.01[/TD]
[TD="align: center"]$50[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]7/25/14[/TD]
[TD="align: center"]5,000[/TD]
[TD="align: center"]X[/TD]
[TD="align: center"]24.565[/TD]
[TD="align: center"]0.01[/TD]
[TD="align: center"]$50[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]7/25/14[/TD]
[TD="align: center"]5,000[/TD]
[TD="align: center"]X[/TD]
[TD="align: center"]24.565[/TD]
[TD="align: center"]0.01[/TD]
[TD="align: center"]$50[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]7/28/14[/TD]
[TD="align: center"]6,500[/TD]
[TD="align: center"]X[/TD]
[TD="align: center"]24.565[/TD]
[TD="align: center"]0.01[/TD]
[TD="align: center"]$65[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]7/30/14[/TD]
[TD="align: center"]15,000[/TD]
[TD="align: center"]X[/TD]
[TD="align: center"]24.565[/TD]
[TD="align: center"]0.01[/TD]
[TD="align: center"]$150[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]7/30/14[/TD]
[TD="align: center"]30,000[/TD]
[TD="align: center"]X[/TD]
[TD="align: center"]24.565[/TD]
[TD="align: center"]0.02[/TD]
[TD="align: center"]$600[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]7/31/14[/TD]
[TD="align: center"]20,000[/TD]
[TD="align: center"]X[/TD]
[TD="align: center"]24.565[/TD]
[TD="align: center"]0.02[/TD]
[TD="align: center"]$400[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]7/31/14[/TD]
[TD="align: center"]10,000[/TD]
[TD="align: center"]X[/TD]
[TD="align: center"]24.565[/TD]
[TD="align: center"]0.02[/TD]
[TD="align: center"]$200[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]8/1/14[/TD]
[TD="align: center"]8,400[/TD]
[TD="align: center"]X[/TD]
[TD="align: center"]24.565[/TD]
[TD="align: center"]0.02[/TD]
[TD="align: center"]$168[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]8/1/14[/TD]
[TD="align: center"]26,500[/TD]
[TD="align: center"]X[/TD]
[TD="align: center"]24.565[/TD]
[TD="align: center"]0.02[/TD]
[TD="align: center"]$530[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]8/4/14[/TD]
[TD="align: center"]20,000[/TD]
[TD="align: center"]X[/TD]
[TD="align: center"]24.565[/TD]
[TD="align: center"]0.02[/TD]
[TD="align: center"]$400[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]8/4/14[/TD]
[TD="align: center"]1,500[/TD]
[TD="align: center"]X[/TD]
[TD="align: center"]24.565[/TD]
[TD="align: center"]0.02[/TD]
[TD="align: center"]$30[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Try this in L2 and copy down:

=SUMPRODUCT($B$2:$B$20,$E$2:$E$20,--($A$2:$A$20>=I2),--($A$2:$A$20<=J2))/SUMPRODUCT(($B$2:$B$20),--($A$2:$A$20>=I2),--($A$2:$A$20<=J2))
 
Upvote 0
with an pivot table.

Date Qty Stock Price Commission $ value month
07-02-2014 15 X 24.565 0.01 $150 150 juli
07-03-2014 5,5 X 24.565 0.01 $55 55 juli
07-10-2014 25 X 24.565 0.01 $250 250 juli
7/23/14 20 X 24.565 0.01 $200 200 juli
7/23/14 20 X 24.565 0.01 $200 200 juli
7/24/14 10 X 24.565 0.01 $100 100 juli
7/25/14 10 X 24.565 0.01 $100 100 juli
7/25/14 5 X 24.565 0.01 $50 50 juli
7/25/14 5 X 24.565 0.01 $50 50 juli
7/25/14 5 X 24.565 0.01 $50 50 juli
7/28/14 6,5 X 24.565 0.01 $65 65 juli
7/30/14 15 X 24.565 0.01 $150 150 juli
7/30/14 30 X 24.565 0.02 $600 600 juli
7/31/14 20 X 24.565 0.02 $400 400 juli
7/31/14 10 X 24.565 0.02 $200 200 juli
08-01-2014 8,4 X 24.565 0.02 $168 168 aug
08-01-2014 26,5 X 24.565 0.02 $530 530 aug
08-04-2014 20 X 24.565 0.02 $400 400 aug
08-04-2014 1,5 X 24.565 0.02 $30 30 aug







month Gegevens Totaal
aug Som van value 1.128,00
Som van Qty 56,4
juli Som van value 2.620,00
Som van Qty 202
Eindtotaal Som van value 3.748,00
Eindtotaal Som van Qty 258,4
 
Upvote 0

Forum statistics

Threads
1,223,164
Messages
6,170,444
Members
452,326
Latest member
johnshaji

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