# Returning the Minimum of Integers of a Range

by Allen Wyatt
(last updated August 13, 2016)

Alec has a range of cells that can contain both integer (23) and decimal (23.4) values. He needs a formula that will return the minimum value of only the integers within the range. Any decimal number within the range should be ignored by the formula completely. It needs to be a formula; a macro would not be viable for Alec's needs.

If you don't mind using a helper column, you could easily figure out if the value is an interger or not. All you need to do is use a formula such as this in the helper column:

```=IF(A1=INT(A1),A1,"")
```

What you end up with is only the integers, with decimal values replaced by blanks. You can then use the MIN function on the helper column to determine the minimum of those integer values.

If you cannot use a helper column, then the best way to go is with an array formula. Assume, for a moment, that your range of cells is A1:A100. You could use either of the following formulas:

```=MIN(IF(INT(A1:A100)=A1:A100,A1:A100))
```

Remember that this is an array formula. This means that you should not enter it by pressing Enter, but should instead use Ctrl+Shift+Enter.

If you prefer to not use array formulas and you are using Excel 2010 or a later version, then you could use a formula based on the AGGREGATE function:

```=AGGREGATE(15,6,A1:A100/(A1:A100=INT(A1:A100)),1)
```

The various parameters possible to use with the AGGREGATE function are too many to list here, but in this the case the first parameter (15) indicates you want the SMALL function applied, the second parameter (6) indicates you want error values ignored, the third parameter is the array to evaluate, and the fourth parameter (1) indicates we want the first result for SMALL returned.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (655) applies to Microsoft Excel 2007, 2010, 2013, and 2016.

##### Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

##### MORE FROM ALLEN

Getting Rid of Choppiness in Justified Text

Justified text doesn't always produce the best-looking results. Here's how to avoid some of the choppiness that can occur.

Discover More

Creating a List

You can format both numbered and bulleted lists very easily in Word. The tools available on the Formatting toolbar make ...

Discover More

Using Early Dates

Excel is brilliant at handling dates—as long as they aren't dates earlier than the base date used by the program. ...

Discover More

Save Time and Supercharge Excel! Automate virtually any routine task and save yourself hours, days, maybe even weeks. Then, learn how to make Excel do things you thought were simply impossible! Mastering advanced Excel macros has never been easier. Check out Excel 2010 VBA and Macros today!

##### More ExcelTips (ribbon)

Combining Cell Contents

Excel allows you to easily combine text together. Interestingly, it provides two ways you can perform such combinations. ...

Discover More

Dealing with Long Formulas

If your worksheet formulas seem to go on forever, here's a handy way to make them more understandable. (All you need to ...

Discover More

Calculating an Expanding Square

When doing a systematic search for rescue purposes, it isn't unusual to implement what is termed an "expanding square." ...

Discover More
##### Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 8 + 1?

2016-08-14 05:53:29

Michael (Micky) Avidan

@Erik,
I can present several more formulas to achieve the same task - however, one should try and stick to the shortest available.
--------------------------
Michael (Micky) Avidan
“Microsoft® Answers" - Wiki author & Forums Moderator
“Microsoft®” MVP – Excel (2009-2017)
ISRAEL

2016-08-13 11:58:40

Erik

Or using Alex's range of values:
=MIN(IF(MOD(A1:A100,1)>0,MAX(A1:A100),A1:A100))

2016-08-13 11:55:48

Erik

The other matrix formula could be:
=MIN(IF(MOD(B2:B11,1)>0,MAX(B2:B11),B2:B11))

##### This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.