Syntax
=REPT(text, number_times)Arguments
| Argument | Required | Description |
|---|---|---|
text | Required | The text to repeat |
number_times | Required | How many times to repeat it |
How to use REPT
REPT takes 2 required arguments. Type =REPT( in a cell and SheetsBat shows the arguments as you go. Optional arguments are shown in square brackets; leave them out to use their default.
Examples
Each result below was calculated by the SheetsBat formula engine.
=REPT("*-", 3)Result =REPT("-", 0)Result Related text functions
- REGEXREPLACEReplaces the parts of a text that match a regular expression pattern.
- REGEXTESTChecks whether any part of a text matches a regular expression pattern.
- REPLACEReplaces part of a text, given a start position and a number of characters, with other text.
- REPLACEBSame as REPLACE, counting bytes; without a double byte language set as default each character counts as one byte.
- RIGHTReturns the last characters of a text.
- RIGHTBSame as RIGHT, counting bytes; without a double byte language set as default each character counts as one byte.
- SEARCHReturns the position of one text inside another, ignoring case. Accepts the wildcards ? and *.
- SEARCHBSame as SEARCH, counting bytes; without a double byte language set as default each character counts as one byte.
- SPLITSplits text at a delimiter into a row of cells.