# finding minimum between 2 maximum number in an array

#### yoni81

##### New Member
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

#### aqeelnokia99

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

#### Eric W

##### MrExcel MVP
Welcome to the board.

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

ABCDEFGHI
112107539211
2
32

</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))))

</tbody>

<tbody>
</tbody>

#### Fluff

##### MrExcel MVP, Moderator
Removed.
Woluldn't work if both max values were the same.

Last edited:

#### yoni81

##### New Member
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

1,082,295
Messages
5,364,362
Members
400,792
Latest member
Dxmiian

### This Week's Hot Topics

• populate from drop list with multiple tables
Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
• Find list of words from sheet2 in sheet1 before a comma and extract text vba
Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
• Dynamic Formula entry - VBA code sought
Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...