REPT

Returns specified text repeated a number of times.

Sample usage

REPT("ha",4)

REPT(A2,3)

Syntax

REPT(text_to_be_repeated, number_of_repetitions)

  • text_to_be_repeated – The character or string to be repeated.

  • number_of_repetitions – The number of times that text_to_be_repeated should appear in the value returned.

    • The number_of_repetitions can’t exceed the character limit of a cell: 32,000 characters. If number_of_repetitions is greater than 32,000 characters, REPT will return a #VALUE! error.

Notes

  • REPT does not insert spaces between repetitions of text_to_be_repeated. If spaces are desired, a space must be appended to the end of the value of text_to_be_repeated. The resulting return value from REPT will have at least one trailing space, which may be removed with TRIM.

See also

TRIM: Removes leading, trailing and repeated spaces in text.

SUBSTITUTE: Replaces existing text with new text in a string.

SPLIT: Divides text around a specified character or string and puts each fragment into a separate cell in the row.

Examples

true
Visit the Learning Center

Using Google products, like Google Docs, at work or school? Try powerful tips, tutorials, and templates. Learn to work on Office files without installing Office, create dynamic project plans and team calendars, auto-organize your inbox, and more.

Search
Clear search
Close search
Main menu
16362121290217119680
true
Search Help Centre
true
true
true
true
true
35
false
false