Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
Hope someone can help. I have a worksheet I use to generate a chart using VBA code. I then want to label a series, for example, the average on the chart using the number format on worksheet. To find the number format, I use: Formattype = cells(1,1).numberformat Then I use something like Avg. = format(x, formattype) to find the avg to put on the chart. I get weird number formats like $1.28_ when I just use currency. Any suggestions? Thanks. Bill |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I think the easiest for you is to use the TEXT() worksheet function, instead
of the Format$() function, like this Avg = Application.Text(x, formattype) -- Regards Juan Pablo González "Bill" wrote in message ... Hello, Hope someone can help. I have a worksheet I use to generate a chart using VBA code. I then want to label a series, for example, the average on the chart using the number format on worksheet. To find the number format, I use: Formattype = cells(1,1).numberformat Then I use something like Avg. = format(x, formattype) to find the avg to put on the chart. I get weird number formats like $1.28_ when I just use currency. Any suggestions? Thanks. Bill |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks. Works like a charm.
"Juan Pablo González" wrote in message ... I think the easiest for you is to use the TEXT() worksheet function, instead of the Format$() function, like this Avg = Application.Text(x, formattype) -- Regards Juan Pablo González "Bill" wrote in message ... Hello, Hope someone can help. I have a worksheet I use to generate a chart using VBA code. I then want to label a series, for example, the average on the chart using the number format on worksheet. To find the number format, I use: Formattype = cells(1,1).numberformat Then I use something like Avg. = format(x, formattype) to find the avg to put on the chart. I get weird number formats like $1.28_ when I just use currency. Any suggestions? Thanks. Bill |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
formating numbers | Excel Worksheet Functions | |||
formating numbers | Excel Discussion (Misc queries) | |||
formating numbers | Excel Discussion (Misc queries) | |||
formating numbers | Excel Discussion (Misc queries) | |||
formating numbers | Excel Discussion (Misc queries) |