Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dear Excel Helper
In an Excel workbook I have a worksheet and a chart. In the worksheet in cell P1 I have worked out a value as a percentage. I have this displayed on my chart by using the folowing within my VBA code... ActiveChart.Shapes("Text Box 13").Select Selection.Characters.Text = Sheets("ComboBoxRef").Range("$P$1") Now, the problem is as follows. On my worksheet, cell P1 is formatted to display just two decimal places i.e. it displays as 6.3. However, on my chart it displays as 6.32203200179032. How can I get it displayed as two decimal places on my chart? I have tried formatting the cell P1 but it makes no difference regaring what is displayed. It is as if VBA only displays the 'underlying' value. I have messed about with... application.worksheetfunction.fixed(P1,2) and... numberformat= "0.0" but it seems unsatisfactory. If there is an easy way around this please let me know. Best Regards Alex |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
decimal places | Excel Discussion (Misc queries) | |||
Decimal Places | Excel Discussion (Misc queries) | |||
Subtracting two 2-decimal place numbers gives result 13-decimal places? | Excel Worksheet Functions | |||
FIXED 2 DECIMAL PLACES, MUST ENTER ALL ZEROES AFTER DECIMAL POINT. | Excel Discussion (Misc queries) | |||
decimal places | Excel Discussion (Misc queries) |