Formula related to a high watermark calculation

badger6225

New Member
Joined
Oct 13, 2013
Messages
9
Hello, I have the following column of data in D5 through D15.

128.68
142.68
149.69
173.32
182.84
115.19
145.67
167.60
171.14
198.52
237.81

<tbody>
</tbody>

<tbody>
</tbody>
What I'd like to do in E5 through E15 is take the value from the corresponding D cell if it is higher than the previous cell. For example, cell E5 would take the value of D5 (128.68). E6 would take D6 (142.68). This would continue through E9. However, E10 would not use the value of D10, it would have the same value as D9 because D10 is lower than the previous high in column D.

The value for E11, E12 etc should continue to use the old high until it has been broken. For example, E11, E12 and E13 will still use the value from D9 because it is the most recent high. E14 will have the new value from D14 (198.52) because it is the new high in column D.

Any help is appreciated.
 
Last edited:

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Sorry, I made a mistake in the description. Instead of saying "...take the value from the corresponding D cell if it is higher than the previous cell", I meant "...take the value from the corresponding D cell if it is higher than all the previous cells in the column"
.
 
Upvote 0
OldNew
128.68128.68
142.68142.68
149.69149.69
173.32173.32
182.84182.84
115.19182.84
145.67182.84
167.6182.84
171.14182.84
198.52198.52
237.81237.81

<COLGROUP><COL style="WIDTH: 58pt; mso-width-source: userset; mso-width-alt: 2759" width=78><COL style="WIDTH: 48pt" width=64><TBODY>
</TBODY>

E5, copied down:

=IF($D5>N($E4),$D5,LOOKUP(9.99999999999999E+307,$E$4:E4))
 
Upvote 0
I am sure that Aladin's solution will work, but MAX($D$2:D2) put in E2 and copied down will give the same result and be better understood by others maintaining the spread heet
 
Upvote 0
Thanks everyone for the replies. Yes, the max function does simplify things, not sure why I didn't think of that before. I'm adding one more layer of complexity to this problem. The reason I am calculating the high water mark is to simulate the value of an investment portfolio when you include fees. However, the fee is only paid on an incremental gain above the previous watermark, in this case 10% of gains.

For example, let's say I start out with $1000 and I get 10% return in the market. The gain is $100, but I need to pay $10 in fees. So the new value of my portfolio is $1090. This is now the new watermark. Say the next year, I earn a positive return of 11.2125% and after fees the new value of my portfolio is $1200.

In year 3, the market drops 10%, so the new value is 1080.

What I'm trying to do in excel is say, any gains after year 3 should only be charged a fee once the high water mark of $1200 is breached. So in year 4, if I earn 10%, no fee is paid because 1080*1.1=1188 which is below the water mark. However if the return in year 4 was 20%, 1080 *1.2 = 1296, I should only pay a fee on 96 (1296 -1200), not the full 20% gain. In that case, I would pay $9.60 in fees and the new water mark value is $1296-$9.60 = $1286.40.

I've included the table of data below for an illustration. I'm stuck formulas for columns C and D.

YearReturnValueWatermark (Value after fees)Fees
Yr 110%1100109010
Yr 211.21%1212.22120012.12
Yr 3-10%108012000
Yr 420%129612969.6

<colgroup><col span="2"><col><col><col></colgroup><tbody>
</tbody>
 
Last edited:
Upvote 0
Ok, that makes it more interesting. Does this do it for you. Note I have a different formula in the first year, but on reflection I think they can all be the same

Excel Workbook
ABCDE
1dateInvestmentEarnings %Earnings $Fee
21/01/2012 1,000.0010% 100.0010.00
31/01/2013 1,090.0011.21% 122.2212.22
41/01/2014 1,199.99-10%- 120.00-
51/01/2015 1,080.0020% 216.009.60
61/01/2016 1,286.39
Sheet9
 
Upvote 0

Forum statistics

Threads
1,215,422
Messages
6,124,811
Members
449,191
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