Quick, clean, and to the point

Excel REPT Function

Excel REPT function

The Excel REPT function repeats characters a given number of times. For example, =REPT("x",5) returns "xxxxx".

Repeat text as specified
Return value 
The repeated text.
=REPT (text, number_times)
  • text - The text to repeat.
  • number_times - The number of times to repeat text.
Usage notes 

The REPT function repeats characters a specified number of times. For example, to repeat "x" five times, you can use the following formula:

=REPT("x",5) // returns "xxxxx"

Inputs to REPT can be variable. In the example shown, REPT is configured to repeat the string in column B using the count in column C.  The formula in D5 is:

=REPT(B5,C5) // returns "-----"

The REPT function can be used in clever ways in more advanced formulas. See links below for specific examples.


  • Use the REPT function to repeat text a given number of times. This can be useful if you want to fill a cell, or pad values to a certain length.
  • It's possible to build a basic histogram chart using REPT, by translating values directly into a certain number of (repeated) characters.

Download 100+ Important Excel Functions

Get over 100 Excel Functions you should know in one handy PDF.