Microsoft Office Tutorials and References
In Depth Information
LEN
For example:
=LEFT(“John Doe”,4) results in John.
=LEFT(A5,4) results in John where cell A4 contains the name John Doe.
You can also use cell referencing within the function. Also see the LEN function.
LEN LEN returns the number of characters in a text string.
=LEN(text)
The LEN function on its own returns the number of characters in a text string.
TEXT The text refers to the text string, word, or multiple words that you want to find
the number of characters for from left to right. Spaces count as one character.
=LEN(“Mn Albany”) would result in 9. The number of characters also includes spaces. However,
combined with other functions in Excel, the LEN function becomes a powerful tool for extracting text
strings. If you work in an environment where you have to clean workbooks that were set up
improperly, or you’ve inherited lists of information and have to extract text strings within cells for your own
particular purposes, use the LEN function in conjunction with other Excel functions. Notice the
example in Figure 12.6. Let’s say I wanted to extract the equipment brand from the equipment type. The
function =RIGHT(C17,LEN(C17)-FIND(“ “,C17)) results in Caterpillar, because the function extracts
the text to the right of the space. See also the RIGHT function later in this chapter.
A
Counts characters
Figure 12.6
Use LEN with other
functions in Excel for
text extraction.
3
LEN
B
RIGHT
D
FIND
Search JabSto ::




Custom Search