Finding the MIN of the MOD to a range of cells

FryGirl

Well-known Member
Joined
Nov 11, 2008
Messages
1,366
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
I have the range below and would like to find the MIN to a range of cells for the MOD of the value. In H9 I'm looking for the MAX, but in H10 I would like the MIN.

Here is the formula I'm using for the MAX. Is this the best method to use? Cells H6 and H7 are actually 0.00. I just have the custom format to hide 0.00.

=MAX(MOD(H2,1),MOD(H3,1),MOD(H4,1),MOD(H5,1),MOD(H6,1),MOD(H6,1),MOD(H7,1))

Data Range
[TABLE="class: grid"]
<tbody>[TR]
[TD][/TD]
[TD]
H​
[/TD]
[/TR]
[TR]
[TD]
1​
[/TD]
[TD]
FRAC​
[/TD]
[/TR]
[TR]
[TD]
2​
[/TD]
[TD]
0.06​
[/TD]
[/TR]
[TR]
[TD]
3​
[/TD]
[TD]
0.20​
[/TD]
[/TR]
[TR]
[TD]
4​
[/TD]
[TD]
0.30​
[/TD]
[/TR]
[TR]
[TD]
5​
[/TD]
[TD]
0.44​
[/TD]
[/TR]
[TR]
[TD]
6​
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
7​
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
8​
[/TD]
[TD]
1​
[/TD]
[/TR]
[TR]
[TD]
9​
[/TD]
[TD]
0.44​
[/TD]
[/TR]
[TR]
[TD]
10​
[/TD]
[TD]
0.20​
[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Try:

=AGGREGATE(14,6,MOD(H2:H7,1)/(H2:H7<>0),1)

for the max, and

=AGGREGATE(15,6,MOD(H2:H7,1)/(H2:H7<>0),1)

for the min.
 
Upvote 0
Hello,

Not sure to understand your basic Mod function ...

=Mod(H2,1) should result into H2 ... no ...???
 
Upvote 0
FryGirl, Glad to help! :cool:

James, the MOD function in Excel has an odd quirk. If you use it on a number with decimals, MOD(12.34, 1) will return the decimals, or .34.
 
Upvote 0
James, the MOD function in Excel has an odd quirk. If you use it on a number with decimals, MOD(12.34, 1) will return the decimals, or .34.

Granted ...

But her list does not show a single integer ... !!! :wink:
 
Upvote 0
Granted ...

But her list does not show a single integer ... !!! :wink:


Granted! And if that's the case, a simple MAX(H2:H7) and MIN(H2:H7) will work. I didn't make that assumption though, although it might have been worth asking.
 
Upvote 0
That is correct. I could have a value of 6.67 so I need the .67.

How about a fellow up question.

Data Range
[TABLE="class: grid"]
<tbody>[TR]
[TD][/TD]
[TD]
Y​
[/TD]
[/TR]
[TR]
[TD]
3​
[/TD]
[TD]
1.80​
[/TD]
[/TR]
[TR]
[TD]
4​
[/TD]
[TD]
2.70​
[/TD]
[/TR]
[TR]
[TD]
5​
[/TD]
[TD]
4.00​
[/TD]
[/TR]
</tbody>[/TABLE]

<strike></strike>
With this range, I would like to find as the MIN, .70, not the 4.00
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,707
Messages
6,174,000
Members
452,542
Latest member
Bricklin

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