variable number format in cell

G

Guest

Hi
How can i get cell to have 3 decimals places if value below 5 and 2 decimals
if between 5 and 50 and 1 decimal if greater than 50.

I think I know how to do by e a macro but can I use data validation or other
formula
Thanks Tina
 
B

Bob Phillips

Use a custom format of

[<5]0.000;[<=50]0.00;0.0

--
HTH

Bob Phillips

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

Niek Otten

Hi Tina,

Format>Cells>Number tab, Custom, in the Type box, enter: [<5]#.000;[<50]#.00;#.0

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

| Hi
| How can i get cell to have 3 decimals places if value below 5 and 2 decimals
| if between 5 and 50 and 1 decimal if greater than 50.
|
| I think I know how to do by e a macro but can I use data validation or other
| formula
| Thanks Tina
 

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