Formula to find max and min in a range

Ombir

Active Member
Joined
Oct 1, 2015
Messages
433
Hi Friends,

I need to find max and min from a given range based on criteria. Input and Output format is shown below.

Input:

AB
1CodeNumber
2011234
3013445
401566
50166634
60245678
70233
802456
9033456
100323
1103456
1203678
1303111

<tbody>
</tbody>
Sheet2


<tbody>
</tbody>
Output:

GHI
1CodeMinMax
20156666634
3023345678
403233456

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


<tbody>
</tbody>
Please help with some formulae. Thanks.
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Try


Excel 2007
GHI
2CodeMinMax
3156666634
423345678
53233456
Sheet1
Cell Formulas
RangeFormula
H3{=MIN(IF($A$2:$A$13=1,$B$2:$B$13))}
H4{=MIN(IF($A$2:$A$13=2,$B$2:$B$13))}
H5{=MIN(IF($A$2:$A$13=3,$B$2:$B$13))}
I3{=MAX(IF($A$2:$A$13=1,$B$2:$B$13))}
I4{=MAX(IF($A$2:$A$13=2,$B$2:$B$13))}
I5{=MAX(IF($A$2:$A$13=3,$B$2:$B$13))}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
@Michael M

Why hard coding 1, 2, 3... in your formula?
In H3: {=MIN(IF($A$2:$A$13=$G3,$B$2:$B$13))} and copy down
In I3: {=MAX(IF($A$2:$A$13=$G3,$B$2:$B$13))} and copy down

Makes sense?

Regards
XLearner
 
Upvote 0

Forum statistics

Threads
1,215,565
Messages
6,125,583
Members
449,237
Latest member
Chase S

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