REPT function
Repeats text a given number of times.
Text
Where can you use it?
Data preparation and reporting teams. Use this group to clean, split or reformat IDs, names and descriptions before using them in reports.
Scenario in the workbook
Repeat a marker to build a text indicator. Zero repeats return empty text.
A worked example from the workbook
| Row | A | B |
|---|---|---|
| 6 | First value | Second value |
| 7 | * | 4 |
| 8 | # | 2 |
| 9 | ! | 0 |
Record 1
=REPT(A7,B7)Expected result****
See the inputs and instructions for all 3 examplesCopyable formulas
English Excel · en-US
=REPT("*",4)Turkish Excel · tr-TR
=YİNELE("*";4)Expected result
“****”
Worked examples
Repeat a marker to build a text indicator. Zero repeats return empty text.
Open the English sheet. Inputs begin at A6. F7:F9 show the live results and G7:G9 show the original results for comparison.
| Row | A | B |
|---|---|---|
| 6 | First value | Second value |
| 7 | * | 4 |
| 8 | # | 2 |
| 9 | ! | 0 |
| Case | Formula | Expected result |
|---|---|---|
| Record 1 | =REPT(A7,B7) |
**** |
| Record 2 | =REPT(A8,B8) |
## |
| Record 3 | =REPT(A9,B9) |
Empty text |