Registrations are now open. Join us today!
There is still a lot of work to do on the wiki yet! More information about editing can be found here.
Already have an account?

Microsoft KB Archive/107073

From BetaArchive Wiki
Knowledge Base


Works: How to Append Text to Numbers in Spreadsheet or Database

Article ID: 107073

Article Last Modified on 11/15/2004



APPLIES TO

  • Microsoft Works 3.0 Standard Edition
  • Microsoft Works 4.5 Standard Edition
  • Microsoft Works 4.5a
  • Microsoft Works 4.0 Standard Edition
  • Microsoft Works 4.0a



This article was previously published under Q107073

SUMMARY

You can append text to numerical data within a spreadsheet cell or database field using a formula. This can be used to specify the units of the number (for example, "89.6 metric tons"), add additional information to the number (for example, "6.7 percent is our best increase ever"), and so on.

MORE INFORMATION

The formula needed to append text is as follows

=String(N,D)&"Text"


where:

N = The numerical data (or formula)
D = The number of decimal places desired for N
Text = Text to append (note that it must be in quotation marks)


As the number or formula "N" changes, the display with the appended text does also. The String function in the formula above converts the numerical data to a string and the "&" operator places the appended text at the end of the new string.

The following is an example:

  1. In a spreadsheet, type 20 in cell A1.
  2. In cell B1 type the following equation:

    =String(A1,2)&" points"

This will produce the following result in B1:

20.00 points


NOTE: If the equation is being used in a database, place the name of the field containing the numerical data in the place of A1 above.

Keywords: kbhowto KB107073