# help with selecting a range of numbers

#### chrysti

##### Board Regular
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
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?

### Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.

#### SteveO59L

##### Well-known Member
Have a look at the Large() function

#### chrysti

##### Board Regular
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.

Replies
5
Views
246
Replies
2
Views
303
Replies
0
Views
295
Replies
1
Views
886
Replies
5
Views
363

1,190,770
Messages
5,982,830
Members
439,799
Latest member
matts12

### 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.

### Which adblocker are you using?

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

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