Finding the minimum value that is not zero for each sub-set of data

phillipsdp11

New Member
Joined
Nov 8, 2016
Messages
5
Hi -

I have a data set that is sorted by Member ID and each Member ID can have multiple transactions. In my desired outcome I only want the non-zero minimum value displayed for the group next to the corresponding transaction in each subset of Member ID's. See example below:

Unique IDTotal CostDesired Outcome
1x1$2,944.47$0.00
1x1$246.13$0.00
1x1$0.00$0.00
1x1$36.00$36.00
1x1$1,500.00$0.00
1x1$545.00$0.00
2x2$1,835.06$0.00
2x2$0.00$0.00
2x2$3.00$3.00
2x2$202.00$0.00
2x2$21.74$0.00
3x3$5.00$5.00
3x3$235.00$0.00
3x3$0.00$0.00
3x3$0.00$0.00
3x3$0.00$0.00
3x3$1,363.20$0.00
ContinuedContinuedContinued

<tbody>
</tbody><colgroup><col><col><col></colgroup>
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
I have solved my own problem, answer below:

=MIN(IF($A2=$A$2:$A$1248,IF($B$2:$B$1248=0,MAX($B$2:$B$1248),$B$2:$B$1248)))
 
Upvote 0
Correction above formula repeats minimum value, this answer only puts minimum value next to the corresponding row with the minimum value:

=IF(AND(MIN(IF($A2=$A$2:$A$1248,IF($B$2:$B$1248=0,MAX($B$2:$B$1248),$B$2:$B$1248)))=B2,MIN(IF($A2=$A$2:$A$1248,IF($B$2:$B$1248=0,MAX($B$2:$B$1248),$B$2:$B$1248))),0)
 
Upvote 0

Forum statistics

Threads
1,216,529
Messages
6,131,197
Members
449,634
Latest member
sunilj56

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