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.


ABCDEFGHIJKLM
DateQtyStockPriceCommission$TotalsStartEndQtyAvg Commission$
7/2/1415,000X24.5650.01$150Jul-147/2/147/31/14202,0000.01$2,620
7/3/145,500X24.5650.01$55Aug-148/1/148/31/14821,385$0
7/10/1425,000X24.5650.01$250
7/23/1420,000X24.5650.01$200
7/23/1420,000X24.5650.01$200
7/24/1410,000X24.5650.01$100
7/25/1410,000X24.5650.01$100
7/25/145,000X24.5650.01$50
7/25/145,000X24.5650.01$50
7/25/145,000X24.5650.01$50
7/28/146,500X24.5650.01$65
7/30/1415,000X24.5650.01$150
7/30/1430,000X24.5650.02$600
7/31/1420,000X24.5650.02$400
7/31/1410,000X24.5650.02$200
8/1/148,400X24.5650.02$168
8/1/1426,500X24.5650.02$530
8/4/1420,000X24.5650.02$400
8/4/141,500X24.5650.02$30

<tbody>
</tbody>

<tbody>
</tbody>
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
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,221,580
Messages
6,160,625
Members
451,659
Latest member
honggamthienha

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