Choosing previous month end for monthly returns

mloveloc

New Member
Joined
Apr 8, 2015
Messages
10
Hi,

This is a problem I have been trying to solve for quite sometime. Every month I have the calculate monthly returns, (current month's price/previous month's price)-1 (or (current month's price/previous month's price)/previous month's price, either work.)

I want to make this process automatic however, the prices are valued weekly rather than monthly. I need to skip the weekly prices and go to the previous month's end price (last business day rather than the true month end.) Unfortunately, I can't count up a particular number of cells because the number of weeks fluctuate depending on the month and year.

This is how I have set up my data:

DateMonth End Nav?Price per unitMonthly Returns
Nov 2, 2015
FALSE11.67
Nov 9, 2015FALSE11.64
Nov 16, 2015FALSE11.97
Nov 23, 2015FALSE12.06
Nov 30, 2015TRUE11.992.80%
Dec 7, 2015FALSE11.99
Dec 14, 2015FALSE12.01
Dec 21, 2015FALSE11.76
Dec 29, 2015TRUE11.82-3.71%
Dec 31, 2015FALSE11.85
Jan 4, 2016FALSE12.19
Jan 11, 2016
FALSE12.73
Jan 18, 2016FALSE12.48
Jan 25, 2016TRUE12.385.64%
Feb 1, 2016FALSE12.88
Feb 8, 2016FALSE12.82
Feb 16, 2016FALSE12.69
Feb 22, 2016FALSE12.81
Feb 29, 2016TRUE12.812.65%

<tbody>
</tbody>

I was hoping someone could help me (possibly search for the previous TRUE?) I am just unsure of how to do it that correctly choose the price. If possible it would be great also if it leaves the cell blank (or 0) for the weeks that are false to help my coworkers not confuse the wrong date. Learning how to do this would also help automate a lot of other tasks so it would be much appreciated!

Thanks,
Madeleine
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
See if this returns the amounts. It returns nothing for 11/30/2015 because there is no previous month to reference in the data.

Code:
=IFERROR(IF(B2=TRUE,(LOOKUP(2,1/(TRUE=$B$1:B1),$C$1:C1)),""),"")
 
Upvote 0

Forum statistics

Threads
1,215,425
Messages
6,124,826
Members
449,190
Latest member
rscraig11

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