Finding the MIN of the MOD to a range of cells

FryGirl

Well-known Member
Joined
Nov 11, 2008
Messages
1,142
Office Version
2016
Platform
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
H​
1​
FRAC​
2​
0.06​
3​
0.20​
4​
0.30​
5​
0.44​
6​
7​
8​
1​
9​
0.44​
10​
0.20​

<tbody>
</tbody>
 

Some videos you may like

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest

Eric W

MrExcel MVP
Joined
Aug 18, 2015
Messages
9,294
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.
 

FryGirl

Well-known Member
Joined
Nov 11, 2008
Messages
1,142
Office Version
2016
Platform
Windows
Thank you Eric. Works great for my needs.
 

James006

Well-known Member
Joined
Apr 4, 2009
Messages
3,680
Hello,

Not sure to understand your basic Mod function ...

=Mod(H2,1) should result into H2 ... no ...???
 

Eric W

MrExcel MVP
Joined
Aug 18, 2015
Messages
9,294
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.
 

James006

Well-known Member
Joined
Apr 4, 2009
Messages
3,680
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:
 

Eric W

MrExcel MVP
Joined
Aug 18, 2015
Messages
9,294
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.
 

FryGirl

Well-known Member
Joined
Nov 11, 2008
Messages
1,142
Office Version
2016
Platform
Windows
That is correct. I could have a value of 6.67 so I need the .67.

How about a fellow up question.

Data Range
Y​
3​
1.80​
4​
2.70​
5​
4.00​

<tbody>
</tbody>

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

FryGirl

Well-known Member
Joined
Nov 11, 2008
Messages
1,142
Office Version
2016
Platform
Windows
Yes Eric that does it. Thank you.
 

Forum statistics

Threads
1,089,474
Messages
5,408,454
Members
403,207
Latest member
JFoley182

This Week's Hot Topics

  • help please
    SORRY NOT ANY GOOD AT EXCEL SO HELP WOULD BE MUCH APPRECIATED this formula is in a sheet called ignore...
  • two formulas needed
    Hello, I'll try my best to explain this: First formula needed in Sheet1 cell A2: If Sheet1 cell B2 = Sheet2 cell B2 then return a 1. If not then...
  • Dynamic Counts
    Good afternoon, we are tidying up some data & the data seems to be growing quicker than we are tidying it up! What we confirm (by reviewing it...
  • Help Excel formula eliminate duplicate values and keep only 2 identical rows.
    as picture below column A has a duplicate value. but the values are not the same as the rule. sometimes 4 rows, sometimes 10 rows or 7 or 9...
  • Macro Compile Error Sub or Function not defined
    Hello, I am trying to run macros from a validation list, all macros have been created and run perfectly on there own but I'm getting a compile...
  • Last row combined with Current Region VBA
    I'm generally happy finding the last row of data through something like Lastrow = Cells(Rows.Count, "D").End(xlUp) but I don't always receive data...
Top