Domanda

I put an "if" function to give me no decimals if result is >200, if not to give me 1 decimal. It works great, unless the result's decimal is .0, then it doesn't show me my decimal. How can I force the decimal to show? Here is my function: =IF($E$13>200,ROUND($E$13,0),ROUND($E$13,1))

È stato utile?

Soluzione

If representing the number as text is acceptable, the following will solve your problem:

=IF($E$13>200,ROUND($E$13,0),IF(ROUND($E$13,0)=ROUND($E$13,1),CONCATENATE(ROUND($E$13,0),".0"),ROUND($E$13,1)))

If you need to use your number in future calculations, be sure to use the original number, which can be obtained via ROUND($E$13,1).

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top