Excel - Text box linked to cell value

Ask a question
A text box placed in a chart can be linked to a cell value in another sheet in Microsoft Excel. The source text string can be formatted according to the requirements, in this case, percentage and reflected in the text box of the chart. The Visual Basic FormatPercent function can be used to achieve the result without using an if-then-else or for loop. A basic knowledge of Visual Basic scripting may prove to be useful to implement the FormatPercent function in the Excel office software worksheet. Unless specified, the FormatPercent Visual Basic function gives an output approximated to two decimal places.


I have a text box placed in a chart that links to another sheet/cell for its content. The value is a percentage. I can format the source text using conditional format, but the formatting doesn't carry forward into the text box. Is there a way to script/macro or use if/then for the value of a text box to change the font color? The text box is linked simply with "=Data!$J$7"? Any help would be greatly appreciated!


You can try this:

Note that

Thanks to andy for this tip on the forum.
Jean-François Pillou

CCM is a leading international tech website. Our content is written in collaboration with IT experts, under the direction of Jeff Pillou, founder of CCM.net. CCM reaches more than 50 million unique visitors per month and is available in 11 languages.

Learn more about the CCM team