Conditional formatting for numbers


Posted by John Unger on November 26, 2001 3:14 PM

How do I get a column of cells to reduce/add a decimal place if the number is a particular value? I.e., if a cell in column B is "100.0%", I'd just like to show "100%" for that cell, and leave the other cells in the column with the format of "#.0%". There are other instances where if a cell value in a column is less than 0.05, I'd like to be able to display it, but still have the rest of the column rounded to the tenths decimal place. Thanks for taking my question.

John Unger



Posted by Juan Pablo G. on November 26, 2001 3:37 PM

This custom format (Not conditional format...) does this:

[>=1]0%;[<0.05]0.000%;0.00%

If the value of the cell is greater than or equal to 100%, format is 0% (100%,101%,200%). If the cell is less than 5%, it'll show it with three decimals (4.000%,0.005%), and anything else, it'll show with two decimals (10.00%, 50.00%)

Juan Pablo G.