format decimals displayed based on results

G

Guest

Is there a way to format a cell to vary the decimals displayed based on the
results it is showing?
Ex: if the value is <100 show 4 decimal places, if it is over 100 but
less than 1000, show 2 decimals, and over 1000 show no decimals.
 
B

Bob Phillips

Use a format of

[>=1000]#,##0;[>=100]#,##0.00;#,##0.0000

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
B

Bernard Liengme

With a helper column this gets close to your needs
=ROUND(A1,5-LOG(A1))
but it show 1 decimal when A1 > 1000
 
G

Guest

thanks. That does it very nicely

Bob Phillips said:
Use a format of

[>=1000]#,##0;[>=100]#,##0.00;#,##0.0000

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

widman said:
Is there a way to format a cell to vary the decimals displayed based on the
results it is showing?
Ex: if the value is <100 show 4 decimal places, if it is over 100 but
less than 1000, show 2 decimals, and over 1000 show no decimals.
 

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