The Excel REPT Function

Basic Description

The Excel Rept function returns a supplied text string, repeated a specified number of times.

The format of the function is :

REPT( text, number_times )

Where the arguments are as follows :

text - The string to be repeated
number_times - The number of times that the supplied text is to be repeated.
Note :
     -    If number_times is zero, the function returns an empty string
     -    If number_times is a decimal, it is truncated to an integer

The resulting text string must be no longer than 32,767 characters. If it is longer than this, the Rept function returns the Excel #VALUE! error.

Rept Function Examples

The following spreadsheet shows several examples of the Excel Rept function. The format of the function is shown in the spreadsheet on the left and the result is shown in the spreadsheet on the right.

Examples of use of the Excel Rept Function
Excel Rept Function Results

Note that in the above examples:

Return to the Excel Text Functions Page

Return to the List of All Built-In Excel Functions