Product IFS ??????

LikeToLearn

New Member
Joined
Sep 20, 2014
Messages
8
Hello everyone! It's my first time posting so forgive me if I break some unwritten rules!

I am working with many years of historical financial data of a handful of stocks. In the first column I have dates (xx/yy/zzzz), in the next column I used =year() to tell me the year the return took place. In the following columns I have the daily return of each stock I am working with.

I would like to have a formula to calculate the PRODUCT of the returns IF the year in my table matches the returns years. Is that possible? So this formula should see that it is 2012 in my table and find all the 2012 returns and take the product of them.
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,210
You don't really mention the ranges involved...

Control+shift+enter, not just enter:

=PRODUCT(IF(YEAR(DateRange)=2012,ReturnsRange))

Is this something that helps you out?
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,951
Messages
5,834,545
Members
430,295
Latest member
amdis

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
Top