Department of Technology

TECH 394 - Tech Computer Applications

Summer 2004

E-mail Me


Syllabus

Schedule

Handouts

Assignments


All My Webs

Dept Home

 

Mixing Strings and Numbers in Output

In many cases, you want the results of a calulation to be reported with a descriptive string.  For example, on the spreadsheet shown, Cell B5 determines the temperature in degrees Celcius if the temperature in degrees Fahrenheit is entered in cell B3:

wpe7.jpg (28588 bytes)

If you want to display "The temperature in degrees Celsius is" followed by the calcualted value, you need to do two things:

  1. Convert the calculated value to a text string, formatted as you want it to appear.
    The Excel function TEXT( ) converts numeric value to text string.  For example, placing  TEXT(2.715, "$0.00") into a cell yields the string "$2.72".

  2. Concatenate the strings in a single cell.
    The ampersand symbol (&) can be used to tell Excel to concatenate (connect end-to-end) a series of text strings.  This is a special form of equation, and must start with a mathematical sybol such as "=".  Entering ="My name is " & "Bob" in a cell causes Excel to show "My name is Bob"

In the example shown, the TEXT( ) function is concatenated to a descriptive text string:

wpe8.jpg (30522 bytes)

Note that since you want a blank space to appear between the word "is" and the converted number "36.7", that blank must appear in the first text string.