Microsoft Office Tutorials and References
In Depth Information
Text Functions
Here’s a final example of using the & operator. In this case, the formula combines text with the
result of an expression that returns the maximum value in column C:
=”The largest value in Column C is “ &MAX(C:C)
Excel also has a CONCATENATE function, which takes up to 255 arguments. This
function simply combines the arguments into a single string. You can use this function if
you like, but using the & operator is usually simpler.
Displaying formatted values as text
The Excel TEXT function enables you to display a value in a specific number format. Although this
function may appear to have dubious value, it does serve some useful purposes, as the examples
in this section demonstrate. Figure 5-2 shows a simple worksheet. The formula in cell A5 is
=”The net profit is “ & B3
Figure 5-2: The formula in A5 doesn’t display the formatted number.
This formula essentially combines a text string with the contents of cell B3 and displays the
result. Note, however, that the value from cell B3 is not formatted in any way. You might want to
display B3’s contents using a currency number format.
Contrary to what you might expect, applying a number format to the cell that contains
the formula has no effect. This is because the formula returns a string, not a value.
Note this revised formula that uses the TEXT function to apply formatting to the value in B3:
=”The net profit is “ & TEXT(B3,”$#,##0.00”)
This formula displays the text along with a nicely formatted value: The net profit is $118,950.85.
Search JabSto ::

Custom Search