Explanation

The MOD function returns the remainder after division.

With a divisor of 1, MOD will return zero for any whole number.

We use this fact to construct a simple formula that tests the result of MOD.

Excel formula: Highlight unique values

When the result is zero (i.e.

when the number is an integer) the formula returns TRUE, triggering the conditional formatting.

When the result is not zero (i.e.

Excel formula: Get integer part of a number

the number has a decimal component, and dividing by 1 leaves remainder) the formula returns FALSE.

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

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

Excel MOD function

Article image

Article image

Article image

Article image