Excel REPT Function

This Excel Tutorial demonstrates how to use the Excel REPT Function in Excel to repeat text a number of times, with formula examples.

REPT Function Description:

The REPT Function Returns a text string, repeated n number of times.

Formula Examples:

rept function examples

Example Formula Result
One Time =REPT(C5,D5) repeat
3 Times =REPT(C6,D6) repeatrepeatrepeat
Combine With Text =REPT(C7,D7)&” this” repeat this

Syntax and Arguments:

The Syntax for the REPT Formula is:

Function Arguments ( Inputs ):

text – A string of text.

number_times – The number of times to repeat a string a text. If zero, then empty text (“”) Is returned.

Additional Notes


REPT Examples in VBA

You can also use the REPT function in VBA. Type:

Executing the following VBA statements

will produce the following results

Vba rept function

For the function arguments (text, etc.), you can either enter them directly into the function, or define variables to use instead.

Return to the List of all Functions in Excel

How to use the REPT Function in Excel:

To use the AND Excel Worksheet Function, type the following into a cell:
After entering it in the cell, notice how the AND formula inputs appear below the cell:
rept formula syntax
You will need to enter these inputs into the function. The function inputs are covered in more detail in the next section. However, if you ever need more help with the function, after typing “=REPT(” into a cell, without leaving the cell, use the shortcut CTRL + A (A for Arguments) to open the “Insert Function Dialog Box” for detailed instructions:
how to use the rept function in excel

For more information about the REPT Formula visit the
Microsoft Website.