Microsoft Office Tutorials and References
In Depth Information
Chapter 16: Writing Home about Text Functions
Figure 16-2 shows how the MID function helps isolate the fourth and fifth
characters in the hypothetical inventory shown in Figure 16-1. These
characters could represent a storage-bin number for the inventory item. The MID
function makes it easy to extract this piece of information from the larger
product code.
Figure 16-2:
Using MID
to pull
characters
from any
position in
a string.
Finding the long of it with LEN
The LEN function returns a string’s length. It takes a single argument — the
string being evaluated. LEN is often used with other functions, such as LEFT
or RIGHT.
Manipulating text sometimes requires a little math. For example, you may
need to calculate how many characters to isolate with the RIGHT function.
A common configuration of functions to do this is RIGHT, SEARCH, and LEN,
like this:
=RIGHT(A1,LEN(A1)- SEARCH(“ “,A1))
This calculates the number of characters to return as the full count of
characters less the position where the space is. Used with the RIGHT function, this
returns the characters to the right of the space.
The LEN function is often used with other functions, notably LEFT, RIGHT,
and MID. In this manner, LEN helps determine the value of an argument to the
other function.
Search JabSto ::




Custom Search