Next lowest/next highest value

pkh987

New Member
Joined
Sep 21, 2017
Messages
2
Consider the following example of a dataset: 2,3,3,4,5,7,7,8,9. The average is 5.333.

I am looking for a formula that gives me the "next lowest value" and the "next highest value" from the average within the dataset. In this example, the next lowest value is "5" and the next highest value is "7". I have tried various combinations of functions but nothing has worked so far.

Thanks.
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Welcome to the board.

Try:

Excel 2012
A
B
C
D
1
2
5.333333
2
3
5
7
3
3
4
4
5
5
6
7
7
7
8
8
9
9

<tbody>
</tbody>
Sheet6


Worksheet Formulas
Cell
Formula
C1
=AVERAGE(A1:A9)

<tbody>
</tbody>

<tbody>
</tbody>


Array Formulas
Cell
Formula
C2
{=MAX(IF(A2:A9< C1,A2:A9<C1,A2:a9< font="">)</C1,A2:a9<>)}
D2
{=MIN(IF(A2:A9>C1,A2:A9))}

<tbody>
</tbody>
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself

<tbody>
</tbody>



C2 and D2 are array formulas, make sure to enter them using Control+Shift+Enter.
 
Last edited:
Upvote 0
Thanks Eric - that is excellent, works a treat. I would never have got there by trial and error - and its the first time I have used array formulas. Will hang around the forum as may learn a few more tricks!
 
Upvote 0

Forum statistics

Threads
1,215,328
Messages
6,124,295
Members
449,149
Latest member
mwdbActuary

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