Syntax
=REPT(text_to_repeat, number_of_repetitions)
text_to_repeat- The text to repeat.
number_of_repetitions- How many times. Decimals are truncated.
REPT repeats text a given number of times. People use it for quick star ratings, simple in-cell bar charts and padding.
=REPT(text_to_repeat, number_of_repetitions)
text_to_repeatnumber_of_repetitionsShow the rating in B2 as stars: repeat "★" that many times. Answer in C2.
Tip: while typing a formula, click a cell or drag across cells to insert references. Press Enter to check, and Tab to accept a function suggestion.
Each example below runs against this sample sheet. The results are calculated by the same engine as the practice grid.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Student | Class | Score | Passed |
| 2 | Priya | A | 92 | TRUE |
| 3 | Leo | B | 67 | FALSE |
| 4 | Chloe | A | 48 | FALSE |
| 5 | Mateo | B | 81 | TRUE |
| 6 | Ines | C | FALSE | |
| 7 | Kai | C | 75 | TRUE |
| Formula | Result | What it shows |
|---|---|---|
=REPT("★", ROUND(C2 / 20, 0)) | ★★★★★ | Score out of 5 stars. |
=REPT("|", C5 / 10) | |||||||| | An in-cell bar chart. |
=REPT("ab", 3) | ababab | Multi-character text works too. |
Learning step by step? REPT is covered in Lesson 29: REPT, EXACT & VALUE of the free course.