finding minimum between 2 maximum number in an array

yoni81

New Member
Joined
Dec 31, 2018
Messages
2
hi,

i have an array of random numbers and i need to find the minimum number between the first highest number and the new highest number that will come later on.

for example 1,2,10,7,5,3,9,2,11 - 10 is the highest, than 11 is the new max so i need to find the min between - 2.

that calculation need to happen more than one time in the array.

thanks!

Yoni
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
=AGGREGATE(14,6,{1,2,10,7,5,3,9,2,11},COLUMNS($A$1:A1))
move formula to right toget second third soo on high vale
 
Upvote 0
Welcome to the board.

Are you looking for the minimum value between the 2 highest values? If so, try:

ABCDEFGHI
112107539211
2
32

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet2

Worksheet Formulas
CellFormula
I3=MIN(INDEX(A1:I1,MATCH(MAX(A1:I1),A1:I1,0)):INDEX(A1:I1,LOOKUP(2,1/(A1:I1=LARGE(A1:I1,2)),COLUMN(A1:I1))))

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>
 
Upvote 0
Removed.
Woluldn't work if both max values were the same.
 
Last edited:
Upvote 0
i need to find it more the one time.
i need to find max 1 and max 2 and than the min 1. after i need to find max 3 and the min 2 between max 2 and max 3. max 2 > max 1 and max 3> max 2
10 2 5 8 3 11 9 4 6 10 1 14
here 10 is max 1 11 is max 2 and 14 is max 3 and i need to know min - 2 (2 min between max 1 and max 2) and min - 1 (1 is min between max 2 and max 3)

thanks!

yoni
 
Upvote 0

Forum statistics

Threads
1,213,581
Messages
6,114,445
Members
448,573
Latest member
BEDE

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