Documentation/How Tos/Calc: REPT function

From Apache OpenOffice Wiki
< Documentation‎ | How Tos
Revision as of 10:30, 9 December 2008 by Nbrouard (Talk | contribs)

Jump to: navigation, search


REPT

returns a text string comprised of copies of another text string.

Syntax:

REPT(text; number)

returns number copies of text, joined together.

Example:

  • REPT("ha"; 3)
returns hahaha.
  • REPT(ROUND(RAND()*10); 3)
returns nnn where n is a random digit repeated three times, while:
CONCATENATE(ROUND(RAND()*10); ROUND(RAND()*10); ROUND(RAND()*10))
returns xyz where x, y, z are three randomly independent digits.

See also:

CONCATENATE

Text functions

Functions listed alphabetically, Functions listed by category

Personal tools