REPT

Formulas / REPT
Repeat specified text.
REPT(text,number_times)
  • text - the text to repeat
  • number_times - a positive number that specifies how many times to repeat text

Examples

  • =REPT("*-", 3)

    The function allows you to repeat a character or string multiple times. For example, this will display an asterisk and a dash*- 3 times.

  • =REPT("-", 10)

    The function can be used to repeat a single character multiple times. For example, this will display 10 dashes ---------.

  • =REPT("Hello World!", 2)

    This function can also be used to repeat a string of characters multiple times. For example, this will display Hello World! Hello World!.

  • =REPT(CONCATENATE("a", "b"), 3)

    The function can also be used in conjunction with other functions. For example, this will display ababab.

  • =REPT("*", 100)

    The function can be used to display a large number of characters. For example, this will display 100 asterisks ****************************************************************************************************.

Summary

The REPT function is a logical function used to repeat characters a given number of times, fill cells in a worksheet, pad values to a certain length, and build histograms.

  • The REPT function takes two arguments: text and number_times. The text argument is the text to be repeated, and the number_times argument determines the number of times the text will be repeated.
  • The REPT function can repeat numbers as well as text, and can also return a list of results.
  • The text returned by the REPT function is always a text value.


Frequently Asked Questions

What is the REPT function?
The REPT function is a logical function used to repeat characters a given number of times.
What are some uses of the REPT function?
  • Filling cells in a worksheet
  • Padding values to a certain length
  • Building histograms
  • Repeating characters a certain number of times
How do I use the REPT function?
The REPT function takes two arguments: the characters to repeat and the number of times to repeat. For example, REPT("X",5) will return "XXXXX".
What are some tips for using the REPT function?
  • Make sure to match the data type of the characters to repeat with the number of times you want to repeat them.
  • You can use the REPT function to fix data entry errors.
  • The REPT function can be used to create a repeating pattern.

Make Better Decisions
With Data

Analyze data, automate reports and create live dashboards
for all your business applications, without code. Get unlimited access free for 14 days.