help with selecting a range of numbers

chrysti

Board Regular
Joined
Dec 20, 2006
Messages
218
I am trying to select the a range of numbers withing a list of numbers. I want to find the max number in the range and then add that with the surrounding numbers (5) in total but I want the other numbers to be high as well, so I can't default to picking the high and two in front and two behind since there is a possibility that the three in front are higher and the one behind is high.

Example:
0,0,5,7,8,10,12,11,9,4,1,0,0
start with the max - 12
select the four highest surrounding numbers in order - 8,10,11,9

is there a way to write a formula that will sum these numbers?

Thanks in advance! Chrysti
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
I also need them to stay in order...can there be something added to it that would do that???

Example:
0,0,3,12,9,10,15,11,14,13,9,5,2,0

I would want the range of 10,15,11,14,13 even though there is a number before that which is higher than some in this range, I want the range with th highest numbers around the MAX number.
 
Upvote 0

Forum statistics

Threads
1,214,591
Messages
6,120,426
Members
448,961
Latest member
nzskater

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