ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Charts and Charting in Excel (https://www.excelbanter.com/charts-charting-excel/)
-   -   Formatting Labels Using Code (https://www.excelbanter.com/charts-charting-excel/116072-formatting-labels-using-code.html)

juliejg1

Formatting Labels Using Code
 
I have a stacked column chart based on data as follows:
2005 Exchange Volume Inflation Price
Blank 1,862 1,844 1,844 2,210
Up 0 93 0 402 0
Down 0 111 0 36

The 'Down' values are actually negative amounts but have to be shown as
positives for the chart to work properly. My question is, I woulld like the
lables in the chart for the 'Down' values to be put in brackets to represent
negative numbers. However, since the values have to be positive for this
chart to function properly, simply changing the formatting on the cells will
not work. Is there code I can write for this chart to show any values higher
than zero to be put in brackets?

Jon Peltier

Formatting Labels Using Code
 
Apply a custom number format of

"("0")"

Apply it to the Down data and to the data labels for the Down series.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


"juliejg1" wrote in message
...
I have a stacked column chart based on data as follows:
2005 Exchange Volume Inflation Price
Blank 1,862 1,844 1,844 2,210
Up 0 93 0 402 0
Down 0 111 0 36

The 'Down' values are actually negative amounts but have to be shown as
positives for the chart to work properly. My question is, I woulld like
the
lables in the chart for the 'Down' values to be put in brackets to
represent
negative numbers. However, since the values have to be positive for this
chart to function properly, simply changing the formatting on the cells
will
not work. Is there code I can write for this chart to show any values
higher
than zero to be put in brackets?




juliejg1

Formatting Labels Using Code
 
Works perfectly...Thanks!!

"Jon Peltier" wrote:

Apply a custom number format of

"("0")"

Apply it to the Down data and to the data labels for the Down series.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


"juliejg1" wrote in message
...
I have a stacked column chart based on data as follows:
2005 Exchange Volume Inflation Price
Blank 1,862 1,844 1,844 2,210
Up 0 93 0 402 0
Down 0 111 0 36

The 'Down' values are actually negative amounts but have to be shown as
positives for the chart to work properly. My question is, I woulld like
the
lables in the chart for the 'Down' values to be put in brackets to
represent
negative numbers. However, since the values have to be positive for this
chart to function properly, simply changing the formatting on the cells
will
not work. Is there code I can write for this chart to show any values
higher
than zero to be put in brackets?






All times are GMT +1. The time now is 08:14 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com