- Select the cell where you want to display the result of the formula.
- Type the following formula:
Formula:
=IF(ISNUMBER(A1),IF(MOD(A1,1)=0,"[b]Integer[/b]","[b]Fraction[/b]"),"Not a number")
- Press Enter to apply the formula.
Explanation of the formula:
-
ISNUMBER(A1) checks if the value in cell A1 is a number.
-
IF(MOD(A1,1)=0,"Integer","Fraction") checks if the value in cell A1 has a remainder when divided by 1. If the remainder is 0, the value is an integer. If the remainder is not 0, the value is a fraction.
- "Not a number" is displayed if the value in cell A1 is not a number.
You can
drag the formula down to apply it to other cells in the column.