How to find the next 0 in a range, after a specific date. What's the best way to do that?

ExcelOnTheClock

New Member
Joined
Dec 1, 2022
Messages
19
Office Version
  1. 365
Platform
  1. Windows
In investment management, there's a metric called max drawdown, which is the deepest that an asset price has fallen. I know how to calculate that.

I want to return the date when the asset price has returned back to its previous high, after its dropped to its current low. What's the best way to do that?

HERE is a link to the file. Explanations of the columns are below:
  • Column C: monthly returns
  • Column D: cumulative returns
  • Column E: the highest cumulative return so far
  • Column F: the deepest decline in returns so far
    • the deepest cumulative decline is 9/30/2013 at -19.53%
Now, I want to know when column F returns back to 0, after the date 9/30/2013. What's the best way to do that?

Thanks in advance for any help anyone can offer!
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
I want to know when column F returns back to 0, after the date 9/30/2013.
So why do you say the expected answer is 31/1/2015 when column F shows 0 before that on 31/12/2014?
.. and why do you mention cell B52?
 
Upvote 0
So why do you say the expected answer is 31/1/2015 when column F shows 0 before that on 31/12/2014?
.. and why do you mention cell B52?
Ah drat--I edited the file RIGHT before I uploaded. You're correct, I want to return Cell B47. I'm sorry for misspeaking. I want to return Dec 31, 2014 actually. I just fixed the file.
 
Upvote 0
OK, then try this

Excel Formula:
=MINIFS(B4:B59,B4:B59,">"&I5,F4:F59,0)
 
Upvote 0
Solution
You are welcome. Thanks for the follow-up. :)

BTW, For the future I suggest that you investigate XL2BB for providing sample data & expected results. It will generally get you faster/better responses as some helpers choose not to download actual files or are prevented from doing so by work-place restrictions.
(If you have trouble with XL2BB, review the "XL2BB Icons greyed out" link in the 'Known XL2BB issues' section near the top of the XL2BB Instructions page linked above.)
 
Upvote 0
... or you can run a small loop:
VBA Code:
Sub checkZero()
i = 4
Dim a As String
Do While i < ActiveSheet.Range("F7000").End(xlUp).Row
     If CDate(ActiveSheet.Cells(i, 2).Value) > CDate("9/30/2013") And ActiveSheet.Cells(i, 6) = 0 Then
       Exit Do
     End If
     i = i + 1
     Loop
MsgBox i
End Sub
 
Upvote 0

Forum statistics

Threads
1,222,902
Messages
6,168,938
Members
452,227
Latest member
sam1121

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