Using PRODUCT function within SUMIF

AndreK123

New Member
Joined
Jan 19, 2017
Messages
11
Hi,

I want to use the PRODUCT function (to compound % returns data) within a SUMIF statement as looking for the formula to only compound numbers between 2 dates

Can anyone help??

Thank you
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
[TABLE="width: 747"]
<colgroup><col span="9"></colgroup><tbody>[TR]
[TD]Feb 16[/TD]
[TD]Mar 16[/TD]
[TD]Apr 16[/TD]
[TD]May 16[/TD]
[TD]Jun 16[/TD]
[TD]Jul 16[/TD]
[TD]Aug 16[/TD]
[TD]Sep 16[/TD]
[TD]Oct 16[/TD]
[/TR]
[TR]
[TD]-0.01%[/TD]
[TD]0.34%[/TD]
[TD]1.25%[/TD]
[TD]-0.02%[/TD]
[TD]0.60%[/TD]
[TD]1.38%[/TD]
[TD]2.38%[/TD]
[TD]2.35%[/TD]
[TD]0.58%[/TD]
[/TR]
</tbody>[/TABLE]

So I want to create a formula that only compounds the numbers between Mar 16 and Sep 16

But I want it to be flexible so that I can change the start and the end date that it includes
 
Upvote 0
=SUMIF($O$12:$AX$12,"<="&Portfolio!$I$766,'Mth Pos PnL'!O175:AX175)-SUMIF($O$12:$AX$12,"<="&EOMONTH(Portfolio!$I$766,-12),'Mth Pos PnL'!O175:AX175)
That is my current formula
All is says is that sum returns in columns O to AX (where the monthly returns are) if they are between two dates
Instead of a sum formula (which is not compounding the monhtly returns) - I want to use a product formula so that it does do the compounding
 
Upvote 0
Hi

See if this example works.

With

- the data you posted in A1:I2
- start and end dates in M2:N2
- try in O2:

=SUMPRODUCT(PRODUCT(1+(A1:I1>=M2)*(A1:I1<=N2)*A2:I2))-1
 
Upvote 0
Thank you will try, but is there a formula that can make me able to copy down so calculate compound returns for multiple dataseries while keeping the dates on top? As I have several rows with different return data that all need to be calculated
 
Upvote 0
Hi

Not clear about your setup

Anyway you just have to freeze the addresses that do not change.

For ex., with the dates on top like in the example and the start and end dates always M2:N2, use in J2:

=SUMPRODUCT(PRODUCT(1+($A$1:$I$1>=$M$2)*($A$1:$I$1<=$N$2)*A2:I2))-1

copy down
 
Upvote 0

Forum statistics

Threads
1,223,909
Messages
6,175,312
Members
452,634
Latest member
cpostell

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