TEXT

Syntax: TEXT(number; format)

This function returns a given number as a text string formatted according to the given numeric format. Designing your own format is described in Chapter 4. If you already have a numeric format that you like, simply copy it from the Format Code field in the Cells Format dialog box into the Format field in the Function Wizard.

Always remember to put the format string inside double quotes as in this example:

=TEXT(-1000000; "[$$-409]#,##0.00;[RED]-[$$-409]#,##0.00")

which returns –$1,000,000.00.

images

Figure 9-7. Sample result of the TEXT function

Get Beginning OpenOffice Calc: From Setting Up Simple Spreadsheets to Business Forecasting now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.