variable number format in cell

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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)
 
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
 
Back
Top