Share on twitter
Share on linkedin
Share on facebook
Share on pinterest
Share on email
Share on print
Share on twitter
Share on linkedin
Share on facebook
Share on pinterest
Share on email
Share on print

REPT

Repeat same text in Excel
Repeats text a given number of times

Rational

To repeat a text

Description

The Excel REPT function repeat a text for a specified number of times. For example, =REPT(“M”,3) returns “MMM”.

Syntax

=REPT(text, number_times)

Parameters

text – The text to be repeated.
number_times – Number of times to repeat a text

Return Value

New text

Key Notes

  • You can use the SUBSTITUTE function to replace a given text using a new text.
  • Excel store the value of REPT function value in text format hence does not accept the number formatting. For Example, if the return value is 333 you cannot change the cell formatting to $333.
  • We can use ‘&’ operator to join different text strings but preferable for small strings.
  • If number_times is “zero” (0) or blank, REPT returns “” (empty text), number_times argument must be greater than or equal to zero otherwise the Excel will return #VALUE! error.
  • The result of the REPT function cannot be longer than 32,767 characters, or REPT returns #VALUE! error.
If a user wish to repeat same text in a cell for many times (4) for example =REPT(“LOL”, 4) it return LOL LOL LOL LOL.

Keep Reading Similar Functions:

Substitutes new text for old text in a text string in Excel

SUBSTITUTE

The SUBSTITUTE function replace the specific text in a text string that occurs in a specific location. i.e, =SUBSTITUTE(“Butter”,”t”,”l”,2) return “Butler”.

Read More »
Merge series of multiple ranges and/or text strings in Excel

CONCAT

The CONCAT function display text by combining multiple ranges, array and/or strings. I.e., =CONCAT(“Mike “, “Tyson”) returns “Mike Tyson”, note space after “Mike ”.

Read More »
Merge multiple text strings in Excel in Excel

CONCATENATE

The CONCATENATE function display text by merging multiple text strings. I.e., combine separate texts, =CONCATENATE(“Indian “, “Ocean”) returns “Indian Ocean”.

Read More »
To replace part of a text string in Excel

REPLACE

The REPLACE function substitute part of a text string with a new text string. I.e., =REPLACE(“Michael Jackson”,9,6,”Jorda”) returns “Michael Jordan”.

Read More »
Join multiple texts with a delimiter in Excel

TEXTJOIN

The TEXTJOIN function allows concatenating (join) the text from multiple ranges with a delimiter between each text value. E.g., =TEXTJOIN(” ,”,TRUE,”Blue”,”Green”,”White”,”Black”) return ” Blue ,Green ,White ,Black”.

Read More »