REPT

    Text

    Repeats text a specified number of times.

    Translations
    EnglishREPT
    FrenchREPT
    SpanishREPETIR
    GermanWIEDERHOLEN
    ItalianRIPETI
    PortugueseREPT
    DutchHERHALING
    PolishPOWT
    RussianПОВТОР
    TurkishYİNELE
    CzechOPAKOVAT
    HungarianSOKSZOR
    SwedishREP
    DanishGENTAG
    FinnishTOISTA
    Syntax
    REPT(text, number_times)

    Arguments

    • textText to repeat
    • number_timesNumber of repetitions
    Examples
    =REPT("*",5)
    *****

    Five asterisks

    =REPT("-",A1)
    Bar chart

    Simple bar using dashes

    =REPT("0",5-LEN(A1))&A1
    00123

    Pad with leading zeros

    Tips & Best Practices
    • Great for simple in-cell charts
    • Useful for padding strings
    • Max result is 32,767 characters
    Common Mistakes
    • Passing a negative or non-numeric number_times argument, which raises an error since REPT requires a non-negative whole number of repetitions
    • Using REPT to build a visual bar or rating scale without checking cell width or font, since the repeated characters can wrap or overflow unexpectedly depending on the cell's formatting
    • Forgetting REPT's output has a length limit (32,767 characters total) - repeating a long string many times can silently truncate or error out if that limit is exceeded
    Related Functions
    CONCATENATEJoins distinct pieces of text together, rather than repeating a single piece multiple times like REPT.
    TEXTJOINCombines multiple values with a delimiter, a different kind of text assembly than REPT's single-string repetition.
    CHAROften paired with REPT to repeat a specific special character, like a bullet or bar symbol, a set number of times.
    Frequently Asked Questions

    Can REPT take a decimal number of repetitions?

    No, number_times must be a non-negative whole number - Excel truncates a decimal value down to the nearest integer rather than erroring.

    Why does my REPT-based bar chart look uneven?

    This usually comes down to font choice - use a monospaced font so each repeated character takes up the same width, giving a visually consistent bar length.

    Is there a limit to how many times REPT can repeat text?

    Yes, the resulting string can't exceed Excel's 32,767-character cell limit - repeating a long string too many times will hit that ceiling.

    Need to translate a formula using REPT?

    Use our translator to convert your complete formula