format chart textbox font

K

Kim Jackson

I have a text box linked to a cell in a table in the same workbook.
I want to have the font color of the text to reflect that which is in the
cell.
e.g. I have a dollar figure in the cell. It is in a black front for positive
values, and red with parenthese () for negitive figures. At present, I have a
negitive dollar figure which reflects in the sheet as a black $(3,813.47).

How can I make the font format in the text box follow the spreadsheet's
format?
 
J

Jon Peltier

Text boxes do not have a number format property. There are two alternative
ways to get what you want:

Use data labels instead, which are associated with data points.

Use two more cells in the sheet, one which shows positive and zero values
only, the other which shows negative values only. In other words, use these
formulas:

=IF(A1>=0,A1,"")
=IF(A1<0,A1,"")

Place two text boxes in the chart, one linked to the first cell and
formatted with black text, the other linked to the second cell and formatted
with red text. Align these textboxes to coincide with each other.

- Jon
 
K

Kim Jackson

Much thanks Jon. This worked perfectly.

Jon Peltier said:
Text boxes do not have a number format property. There are two alternative
ways to get what you want:

Use data labels instead, which are associated with data points.

Use two more cells in the sheet, one which shows positive and zero values
only, the other which shows negative values only. In other words, use these
formulas:

=IF(A1>=0,A1,"")
=IF(A1<0,A1,"")

Place two text boxes in the chart, one linked to the first cell and
formatted with black text, the other linked to the second cell and formatted
with red text. Align these textboxes to coincide with each other.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services, Inc.
http://PeltierTech.com/WordPress/
_______
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top