MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Formatting


Posted by Leigh on January 08, 2001 6:40 AM

I have formatted a cell to display a number value at 2 decimal places and have displayed the result in a label control on a form. But, the label is displaying the result in an exponential format. Is it possible to display the label.caption as a number format similer to the cell (2 decimal places)?
Any ideas would be greatfully received


Posted by Aaron on January 08, 2001 9:31 AM

The Label Control will only display text.
Change the formula in the desired cell so that the results appear the same as a Number or as Text.
For example:
A1=12.3456789
If it is formatted as Number with 2 decimal places it appears as 12.35, but as Text it still appears as 12.3456789.
Use the ROUND function to get rid of extra decimal places.
Example:
ROUND(A1,2)will appear as 12.35 if it is formatted as a Number or Text.

Posted by Leigh on January 08, 2001 10:24 AM

Many thanks!