Microsoft KB Archive/59968

{|
 * width="100%"|

Excel: Entering Multiple Text Lines in a Chart with a Macro

 * }

-

The information in this article applies to:


 * Microsoft Excel for the Macintosh, versions 2.x, 3.0, 4.0

-

SUMMARY
In a text line in a Microsoft Excel chart, COMMAND+ENTER is used to separate lines of text. To create a macro that enters a multiline text label, concatenate (join) the text using the ASCII code for a return (ASCII 13).

For example, to enter the following as a piece of text in an Excel chart

  1989 World Report Summary

type the following formula in the macro:

  =FORMULA(&quot;1989&quot;&CHAR(13)&&quot;World Report&quot;&CHAR(13)&&quot;Summary&quot;)

MORE INFORMATION
The CHAR(x) function inserts the character with the ASCII code of &quot;x&quot;. The ampersand (&) operator concatenates individual pieces of text into one text string.

For more information on the CHAR function, see page 29 in the &quot;Microsoft Excel Function Reference&quot; version 3.0 manual. If you are using Excel 2.20, see page 27 in the &quot;Microsoft Excel Functions and Macros&quot; version 2.2 manual.

For more information on text concatenation, see page 107 in the &quot;Microsoft Excel User's Guide&quot; version 3.0 manual. If you are using Excel 2.20, see page 516 in the &quot;Microsoft Excel Reference&quot; version 2.2 manual.

Additional query words: noupd

Keywords :

Version :

Platform :

Issue type :

Technology :