Find value in a variable range

susom

Board Regular
Joined
Aug 3, 2011
Messages
57
Office Version
  1. 365
Platform
  1. Windows
I am attempting to identify a max value within a range of values that correspond with a particular date. Specifically, I have created a large file that looks at S&P 500 price data going back to 1950 and I am attempting to identify every time the index experienced a [10%] or greater correction. I've identified all the dates when a low was established at some point in the future that was < 90% of the high price on any particular day.

However, this results in multiple dates that can exist for the same low price--i.e. if the correction was > 10% there typically are multiple days where 'Current High Price' < '90% of Range of Future Low Prices' as the market continues to rally to a peak before ultimately correcting.

How might I go about finding the max 'High Price' within the range of values that occur with the same 'Low Price'? Here is a sample from my data that illustrates my ask. Note that the low price of 16.68 was set on 7/17/1950 and this was 10% or lower than the high prices on a number of dates, but the max high was 19.40 that occurred on 6/12/1950.

I have created a separate list of all the unique 'low dates' that I suspect maybe helpful in the solution--there are 28 of them actually.


Date High Last Min Low Date
05/18/1950 18.56 18.56 16.68 07/17/1950
05/19/1950 18.68 18.68 16.68 07/17/1950
05/22/1950 18.60 18.60 16.68 07/17/1950
05/23/1950 18.71 18.71 16.68 07/17/1950
05/24/1950 18.69 18.69 16.68 07/17/1950
05/25/1950 18.69 18.69 16.68 07/17/1950
05/26/1950 18.67 18.67 16.68 07/17/1950
05/29/1950 18.72 18.72 16.68 07/17/1950
05/30/1950 18.72 18.72 16.68 07/17/1950
05/31/1950 18.78 18.78 16.68 07/17/1950
06/01/1950 18.77 18.77 16.68 07/17/1950
06/02/1950 18.79 18.79 16.68 07/17/1950
06/05/1950 18.60 18.60 16.68 07/17/1950
06/06/1950 18.88 18.88 16.68 07/17/1950
06/07/1950 18.93 18.93 16.68 07/17/1950
06/08/1950 19.14 19.14 16.68 07/17/1950
06/09/1950 19.26 19.26 16.68 07/17/1950
06/12/1950 19.40 19.40 16.68 07/17/1950
06/13/1950 19.25 19.25 16.68 07/17/1950
06/14/1950 18.98 18.98 16.68 07/17/1950
06/15/1950 18.93 18.93 16.68 07/17/1950
06/16/1950 18.97 18.97 16.68 07/17/1950
06/19/1950 18.92 18.92 16.68 07/17/1950
06/20/1950 18.83 18.83 16.68 07/17/1950
06/21/1950 19.00 19.00 16.68 07/17/1950
06/22/1950 19.16 19.16 16.68 07/17/1950
06/23/1950 19.14 19.14 16.68 07/17/1950
07/24/1952 25.24 25.24 22.71 09/14/1953

Apologies for not publishing the data above in a xls table, but the add-in is not permitted on my machine.
 
Something like this,
Book1
ABCDEF
1DateHighLastMinDateHigh Price
25/18/195018.5618.5616.687/17/1950 
35/19/195018.6818.6816.687/17/1950 
45/22/195018.6018.6016.687/17/1950 
55/23/195018.7118.7116.687/17/1950 
65/24/195018.6918.6916.687/17/1950 
75/25/195018.6918.6916.687/17/1950 
85/26/195018.6718.6716.687/17/1950 
95/29/195018.7218.7216.687/17/1950 
105/30/195018.7218.7216.687/17/1950 
115/31/195018.7818.7816.687/17/1950 
126/1/195018.7718.7716.687/17/1950 
136/2/195018.7918.7916.687/17/1950 
146/5/195018.6018.6016.687/17/1950 
156/6/195018.8818.8816.687/17/1950 
166/7/195018.9318.9316.687/17/1950 
176/8/195019.1419.1416.687/17/1950 
186/9/195019.2619.2616.687/17/1950 
196/12/195019.4019.4016.687/17/195019.40
206/13/195019.2519.2516.687/17/1950 
216/14/195018.9818.9816.687/17/1950 
226/15/195018.9318.9316.687/17/1950 
236/16/195018.9718.9716.687/17/1950 
246/19/195018.9218.9216.687/17/1950 
256/20/195018.8318.8316.687/17/1950 
266/21/195019.0019.0016.687/17/1950 
276/22/195019.1619.1616.687/17/1950 
286/23/195019.1419.1416.687/17/1950 
297/24/195225.2425.2422.719/14/195325.24
Sheet3
Cell Formulas
RangeFormula
F2:F29F2=IF(B2=MAXIFS(B:B, E:E, E2), B2, "")
 
Upvote 0
Solution

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