How can I, without using formulas, show integers as integers, but decimals limited to a specific number of decimal places.
e.g. show:
1 as 1
If you would like to use the value as text you can use this (using A1 as the number):
=TEXT(A1,IF(MOD(A1,1)=0,"#","#.##"))
Explanation:
IF(MOD(A1,1)=0: This part checks if the number is a whole number with the modulo function.
"#","#.##": Use "#" if the condition is true and "#.##" if the condition is false. These are appropriate format options for integer and decimal numbers accordingly.
The number of hashes after the decimal in "#.##" define the maximum precision, but it will only display as many as required e.g. 2.1 would not be "2.10", but "2.1" instead.
Alternatively: "#.00" can be used to always pad with 0's, which would make "1.3" become "1.30".