Skip to content
Excel

REPT function in Excel

Repeats text a given number of times

=REPT(text, number_times)

REPT syntax and parameters

Two arguments, two required.

  • textstringRequired

    The text you want to repeat.

  • number_timesnumberRequired

    A positive number specifying the number of times to repeat text.

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 Google Sheets

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…