beautypg.com

Substitute – Apple Numbers '08 User Manual

Page 277

background image

Chapter 12

Dictionary of Functions

277

SUBSTITUTE

The SUBSTITUTE function replaces a string of characters with new text. You can replace
individual characters, whole words, or strings of characters within words. If a string
occurs more than once in the text, you can specify which occurrences to change.

SUBSTITUTE(text, old, new, [occurrence])

 text: The text within which you want to replace characters.
 old: The string of characters you want to replace.
 new: The string of characters that will replace the old string.
 occurrence: Optional; specifies which occurrence of the old string is replaced if there

is more than one. If omitted, all occurrences of the string are replaced.

SUM

The SUM function calculates the sum of a set of numbers. The numbers can be in
individual cells, in ranges of cells, or included directly as arguments to the function.

SUM(number, [number, . . .])

 number: One or more numbers, numeric expressions, or references to a cell or range

of cells containing numbers or numeric expressions.

Examples

SUBSTITUTE("a b c d e f", "b", "B") returns "a B c d e f".

SUBSTITUTE("a a b b b c", "a", "A", 2) returns "a A b b b c".

SUBSTITUTE("a a b b b c", "b", "B") returns "a a B B B c".

SUBSTITUTE("aaabbccc", "bc", "BC", 2) returns "aaabbccc".

Examples

SUM(A1:A4) adds the numbers in four cells.

SUM(A1:D4) adds the numbers in a square array of sixteen cells.

SUM(A1:A4, 100) adds the numbers in four cells plus100.