There are several ways to go about this.

One of the easiest ways is to use theMOD functionwith a divisor of 1.

INT or TRUNC

Another way to solve the problem is with theINT functionor theTRUNC function.

Excel formula: Highlight integers only

If the values match, we know we have a whole number.

Both formulas work fine, but note they behave differently with negative decimal values.

This matters for negative values, because they are rounded away from zero (i.e.

Excel formula: Get integer part of a number

they become more negative).

That said, it doesn’t make a difference in this example.

For example, MOD(10,3) = 1.

Excel formula: Extract date from a date and time

The result of MOD carries the same sign as the divisor.

For example, TRUNC(4.9) will return 4, and TRUNC(-3.5) will return -3.

The TRUNC function does no rounding, it simply truncates as specified.

Excel MOD function

Note that negative numbers becomemore negative.

For example, while INT(10.8) returns 10, INT(-10.8) returns -11.

Excel TRUNC function

Excel INT function