Text All versions ◉ 27 views

=REPT()

Repeats text a given number of times. Use REPT to fill a cell with a number of instances of a text string.

Applies To: Excel for Microsoft 365Excel for Microsoft 365 for MacExcel 2024Excel 2024 for MacExcel 2021Excel 2021 for MacExcel 2019Excel 2016
=REPT(text, number_times)
Hover argument names in the table for details.
Output typeText
Popularity30 / 100
VolatileNo
Dynamic ArrayNo
Download sample .xlsx ▦ Try in Playground Dedicated file for this function — safe & lightweight · sample data + live formulas
Share:

⬇ Download Sample Workbook

A dedicated .xlsx for =REPT() with Persian sample data & live formulas — open in Excel and practice.

  • Sheet “Sample” — data table + formula in place
  • Sheet “Guide” — syntax, arguments & tips from this page
  • Instant & secure (token + rate limit)
Download REPT.xlsx ~ 8–12 KB · No macros

⇪ Share

Send this function to friends

Quiz this function

%d questions — syntax, example & errors — test yourself!

◧ Arguments

ArgumentTypeRequiredDescription
text Text Required The text you want to repeat.
number_times Number Required A positive number specifying the number of times to repeat text.

▣ Examples

Displays an asterisk and a dash (*-) 3 times. =REPT("*-", 3)
Result: *-*-*-
Displays a dash (-) 10 times. =REPT("-",10)
Result: ----------

§ Remarks

  • If number_times is 0 (zero), REPT returns "" (empty text).
  • If number_times is not an integer, it is truncated.
  • The result of the REPT function cannot be longer than 32,767 characters, or REPT returns #VALUE!.

✦ Tips

  • If number_times is 0 (zero), REPT returns "" (empty text).
  • If number_times is not an integer, it is truncated.

⚠ Common Errors

#VALUE! The result of the REPT function cannot be longer than 32,767 characters, or REPT returns #VALUE!.
Fix: Check the second argument

💬 Comments & Q&A 0 approved

🔒 Your comment will be published after review.

Share your thoughts — visible after admin approval

No comments yet — be the first!

✍️ Add comment / question

captcha
🔒 Your comment will be published after review.