Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Conditional Formatting - number of decimal places
I wish to change the number of decimal places displayed in a range of cells,
dependant on the contents of a specific cell. A1 2 A2 A3 1.23 } these cells formatted to 2dp A4 2.34 } because A1 contains 2. A5 3.45 } A6 A7 7.02 } formula =SUM(A3:A5) If I wanted to set the font, border or pattern of the cell I could use conditional formatting. However, conditional formatting cannot control the number of decimal; places displayed. The values in cells A3:A5 are always the result of a formula (not entered directly) so I've tried writing a macro function that uses Format( ) to format a number the way I want. However, this then returns the value as a string, which means that I can't use the displayed results in a sum function. Is there an obvious solution to this? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Chart Number Decimal Places | Excel Discussion (Misc queries) | |||
Conditional formatting & decimal part of a number in cell | Excel Worksheet Functions | |||
conditonally formatting decimal places | Excel Discussion (Misc queries) | |||
Setting the number of decimal places for a text box. | Excel Discussion (Misc queries) | |||
Converting a number to 2 decimal places | Excel Discussion (Misc queries) |