Finding the minimum of a subset

booms

Board Regular
Joined
Dec 2, 2010
Messages
60
Hi, this seems simple but I just can’t get it to work.





I’ve got two columns of data, and what I’m after is the third column.




I need a formula I can roll down that will set out the minimum of each group in the third column – I suspect an array would work?




Group
Value
Min of Group
A
-2
-2
A
4
A
0
B
3
B
6
B
0
0
C
-2
C
-8
-8
D
3
D
9
D
4
D
-4
-4

<tbody>
</tbody>














 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Enter this CTRL-SHIFT-ENTER:

=IF(B2=MIN(IF($A$2:$A$13=A2,$B$2:$B$13)),MIN(IF($A$2:$A$13=A2,$B$2:$B$13)),"")
 
Upvote 0
Actually could be simplified to:

=IF(B2=MIN(IF($A$2:$A$13=A2,$B$2:$B$13)),B2,"")
 
Upvote 0
Actually could be simplified to:

=IF(B2=MIN(IF($A$2:$A$13=A2,$B$2:$B$13)),B2,"")


Thanks again. Out of interest, I'm running this array over about 100,000 lines. It seems to run incredibly slowly (as in, would take half an hour to finish). Is that what you'd expect and is there any way to speed it up?
 
Upvote 0
Yes its a array formula so will be very slow. Can you use a pivot table? It would find the minimum values in blink of an eye
 
Upvote 0

Forum statistics

Threads
1,215,195
Messages
6,123,572
Members
449,108
Latest member
rache47

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