Code, 309 code – Apple iWork '09 User Manual
Page 309

Chapter 11
Text Functions
309
Usage Notes
This can be helpful if text you paste from another application contains unwanted
Â
question marks, spaces, boxes, or other unexpected characters.
There are some less common nonprinting characters that are not removed by
Â
CLEAN (character codes 127, 129, 141, 143, 144, and 157). To remove these, you can use
the SUBSTITUTE function to replace them with a code in the range 0–31 before you
use the CLEAN function.
You can use the TRIM function to remove extra spaces in text.
Â
Example
Suppose you copy what you believe to be the text “a b c d e f” from another application and paste
it into cell A1, but instead see “a b c ? ?d e f”. You can try using CLEAN to remove the unexpected
characters:
=CLEAN(A1) returns “a b c d e f”.
Related Topics
For related functions and additional information, see:
“SUBSTITUTE” on page 322
“Listing of Text Functions” on page 306
“Value Types” on page 36
“The Elements of Formulas” on page 15
“Using the Keyboard and Mouse to Create and Edit Formulas” on page 26
“Pasting from Examples in Help” on page 41
CODE
The CODE function returns the decimal Unicode number of the first character in a
specified string.
CODE(code-string)
Â
code-string: The string from which to return the Unicode value. code-string is a
string value. Only the first character is used.
Usage Notes
You can use the Special Characters window, which is available on the Edit menu, to
Â
view entire sets of characters and their codes.