Skip to content
Google Sheets

REPT function in Google Sheets

Returns specified text repeated a number of times.

=REPT(text_to_repeat, number_of_repetitions)

REPT syntax and parameters

Two arguments, two required.

  • text_to_repeatstringRequired

    The character or string to repeat.

  • number_of_repetitionsnumberRequired

    The number of times text_to_repeat 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.

REPT examples

Formulas you'll actually reuse.

  1. A star rating drawn from a 1–5 score:

    =REPT("★", B2)

    Result"★★★★"

  2. Zero-pad an ID to six digits:

    =REPT("0", 6 - LEN(A2)) & A2

    Result"010422"

REPT in Excel

Same name — your formula ports as-is.

Try REPT in the playground

Edit the example — nothing to install.

Preloaded with the REPT formula from Example 1 — change anything and watch it respond.

Loading the editor…