Replace, Rept – Apple Numbers '08 User Manual

Page 266

Advertising
background image

266

Chapter 12

Dictionary of Functions

 estimate: Optional; an initial rough estimate of the interest rate. If omitted, 10% is

used. Try adjusting the estimate if RATE fails to return a result.

REPLACE

The REPLACE function replaces part of a string with characters from a second string.
The text to be replaced is specified by its length and position in the text.

REPLACE(current-text, start, length, new-text)

 current-text: A text expression.
 start: A number indicating the first character to replace.
 length: The number of characters to replace.
 new-text: The replacement text.

Notes
The new text doesn’t need to be the same length as the removed text.

REPT

The REPT function repeats text a specified number of times.

REPT(text, copies)

 text: The text expression to be repeated.
 copies: The number of times text is repeated.

Examples

RATE(10*12,,-5000,20000) returns 1.16% (when using a fixed number format with a precision of 4). The
return value indicates that a monthly interest rate of 1.16% (or 13.9% annually) is required for $5,000 to
grow to $20,000 in 10 years. The number of years is multiplied by 12 to find the number of monthly
payments.

Examples

REPLACE("received applicant’s forms",10, 9,"Frank") returns "received Frank’s forms".

Examples

REPT("*",5) returns "*****".

REPT("ha",3) returns "hahaha".

Advertising