Microsoft Office Tutorials and References
In Depth Information
Text Functions
Transforming data with formulas
Many of the examples in this chapter describe how to use functions to transform data in some
way. For example, you can use the UPPER function to transform text into uppercase. Often,
you’ll want to replace the original data with the transformed data. To do so, Paste Values over
the original text. Here’s how:
1. Create your formulas to transform the original data.
2. Select the formula cells.
3. Choose Home➜Clipboard➜Copy (or press Ctrl+C).
4. Select the original data cells.
5. Choose Home➜Clipboard➜Paste➜Values.
After performing these steps, you can delete the formulas.
Extracting characters from a string
Excel users often need to extract characters from a string. For example, you may have a list of
employee names (first and last names) and need to extract the last name from each cell. Excel
provides several useful functions for extracting characters:
h LEFT: Returns a specified number of characters from the beginning of a string.
h RIGHT: Returns a specified number of characters from the end of a string.
h MID: Returns a specified number of characters beginning at any position within a string.
The formula that follows returns the last ten characters from cell A1. If A1 contains fewer than ten
characters, the formula returns all of the text in the cell.
This next formula uses the MID function to return five characters from cell A1, beginning at
character position 2. In other words, it returns characters 2–6.
The following example returns the text in cell A1, with only the first letter in uppercase (some-
times referred to as sentence case ). It uses the LEFT function to extract the first character and
convert it to uppercase. This then concatenates to another string that uses the RIGHT function to
extract all but the first character (converted to lowercase).
Search JabSto ::

Custom Search