Displaying decimal places

  • Thread starter KnowledgeSeeker
  • Start date
K

KnowledgeSeeker

Is there a way for me to have the data in a cell determine how many
decimal places should be displayed? For example, if the formula in
the cell results in a number that is greater than (or equal to) 10,
then I'd like to have zero (0) decimal places actually displayed.
However, if the formula in the cell results in a number that is less
than 10, I'd like to have zero (0) decimal places displayed.

Thanks for your help.
 
T

tim m

I don't undersatnd this question, if it is >= 10 then zero decimals, if it is
less than 10 zero decimals? Did you type the questuion correctly or am I
seeing things?
 
B

Bernd

Hello,

Without VBA you will need a helper cell:
=TEXT(A1,"0"&IF(A1<10,".0",""))

Regards,
Bernd
 
H

Harlan Grove

Bernd said:
Without VBA you will need a helper cell:
=TEXT(A1,"0"&IF(A1<10,".0",""))

Wrong. Could use the custom number format

[>=10]0;[<=-10]-0;0.0
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top