ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Custom "conditional" format ? (https://www.excelbanter.com/excel-programming/347950-custom-conditional-format.html)

Don Wiss

Custom "conditional" format ?
 
I find Excel does a pretty good job of hiding the help for custom cell
formats. I found part of it, but I was unable to find the help for when you
want the format to vary depending on the cell value. I tried this:

[=100]#,##0;[<100]0.000;;"-"

Except when the value is zero I get 0.000, which means the ending of the
above isn't working. So how do I get no decimals when 100, three decimals
when less, and a dash when 0?

Don <www.donwiss.com (e-mail link at home page bottom).

JE McGimpsey

Custom "conditional" format ?
 
One way:

[=100]#,##0;[0]0.000;"-";

Note that values <0 will also get the "-", since XL can only have 3
numeric ranges in a custom format.

At least in XL04, the "About custom number formats" Help topic is pretty
complete.

In article ,
Don Wiss wrote:

I find Excel does a pretty good job of hiding the help for custom cell
formats. I found part of it, but I was unable to find the help for when you
want the format to vary depending on the cell value. I tried this:

[=100]#,##0;[<100]0.000;;"-"

Except when the value is zero I get 0.000, which means the ending of the
above isn't working. So how do I get no decimals when 100, three decimals
when less, and a dash when 0?

Don <www.donwiss.com (e-mail link at home page bottom).



All times are GMT +1. The time now is 12:27 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com