Category: FUNCTION | Updated: 2026-11-22

How to Use the REPT Function in Google Sheets | Repeat a Specified Text String

How to Use the REPT Function

The REPT function is a Google Sheets text function that repeats a specified text string a given number of times and returns the concatenated result.

Syntax

=REPT(text_to_repeat, number_of_repetitions)
  • text_to_repeat: The text, symbol, or cell reference to repeat (required).
  • number_of_repetitions: A number greater than or equal to 0 specifying how many times to repeat the text (required).

Examples

Here is an example of displaying star ratings (“★”) equal to each item’s score.

Row Column A (Item) Column B (Score) Column C (Rating Display) Column D (Formula)
1 Item Score Rating Display Formula
2 Design 5 ★★★★★ =REPT("★", B2)
3 Usability 3 ★★★ =REPT("★", B3)
4 Price 4 ★★★★ =REPT("★", B4)
5 Support 0 (Blank) =REPT("★", B5)
  • Explanation: When 0 is specified as the repetition count (row 5), no error occurs and an empty string ("") is returned.

Common Errors and Tips

  • Negative numbers cause a #VALUE! error: Passing a negative repetition count such as -1 results in a #VALUE! error.
  • Exceeding the 32,000-character limit causes #VALUE!: If the generated string exceeds Google Sheets’ per-cell character limit (around 32,000 characters), #VALUE! is returned.
  • Wrap literal text in double quotes: When entering characters directly in the formula, wrap them in double quotation marks like "★". Omitting quotes causes a #NAME? error.

Frequently Asked Questions

Q. Can I create a simple bar chart using the REPT function?

A. Yes. By combining a symbol with a numeric cell like "=REPT("■", B2)", you can create a visual in-cell bar chart.

Q. What happens if I specify a decimal number for the repetition count?

A. The decimal portion is truncated and only the integer part is used. For example, "=REPT("★", 3.9)" displays "★★★" (3 times).