tanvirabid
New Member
- Joined
- Aug 21, 2019
- Messages
- 8
Hi people,
I was hoping to get help on Offset, Product and Year combined. I have monthly returns. To annualize for 12 months, I can use =((PRODUCT(1+B4:B15)-1)) to get the result. Column B has the results.
I want the result to be based on the Years i.e. 2020, 2019, 2018. Since I have many years of monthly data and a new monthly row is added every month. The dates are in column A.
So I wanted to build a dynamic formula using Offset and Year to get the Product result. The purpose of using offset is that new months will be added below row 3.
I am using this formula:
=PRODUCT(IF(YEAR(OFFSET($A$3,1,0,20,1))=$D5,(1+OFFSET(B$3,1,0,20,1))-1))
For instance, the answer for 2020 should be 0.12228
The idea is that Product result should be based on months that belong to the Year 2020, 2019 and so on. However, the formula is not working even with array.
Please see the image.
Thanks a lot.
I was hoping to get help on Offset, Product and Year combined. I have monthly returns. To annualize for 12 months, I can use =((PRODUCT(1+B4:B15)-1)) to get the result. Column B has the results.
I want the result to be based on the Years i.e. 2020, 2019, 2018. Since I have many years of monthly data and a new monthly row is added every month. The dates are in column A.
So I wanted to build a dynamic formula using Offset and Year to get the Product result. The purpose of using offset is that new months will be added below row 3.
I am using this formula:
=PRODUCT(IF(YEAR(OFFSET($A$3,1,0,20,1))=$D5,(1+OFFSET(B$3,1,0,20,1))-1))
For instance, the answer for 2020 should be 0.12228
The idea is that Product result should be based on months that belong to the Year 2020, 2019 and so on. However, the formula is not working even with array.
Please see the image.
Thanks a lot.