How to Use REPT Formula in Excel (Video in Khmer) + Tips

Learn how to use REPT function in Excel step-by-step to repeat text or characters with simple examples and video guide.

Advertisement
Formula
=REPT(text, number_times)

Hello everyone! Today i will show you how to use REPT formula in Microsoft Excel step by step. rept function in excel example

If you want to repeat any character or text many times in Excel (example: repeat star "*" 10 times to make line separator or repeat product code many times), REPT formula help you very fast and easy!

📚 Related Tutorial: Want to clean extra text spaces first? Check out How to Use Text Cleaning Formulas in Excel!

🛠️ Formula Syntax & How It Works

=REPT(text, number_times)
  • text: The character or text string you want to repeat (example: "*" or "Hello").
  • number_times: Positive number how many times you want to repeat text (example: 5 or 10).

📊 Simple Examples

Example 1: Repeat Asterisk to Make Star Rating / Separator

If you want 10 stars **********:

=REPT("*", 10)
  • Result: ********** (10 star asterisks)

Example 2: Repeat Dash - to Make Line Separator

If you want line separator with 20 dashes:

=REPT("-", 20)
  • Result: -------------------- (20 dashes line)

Example 3: Repeat Text Word with Space

If you want to repeat word "Excel " 3 times:

=REPT("Excel ", 3)
  • Result: Excel Excel Excel (3 times with space inside quote)

Example 4: Create In-Cell Bar Chart (Data Visualization)

If cell A2 contain score number 5:

=REPT("█", A2)
  • Result: █████ (create visual progress bar inside cell without chart!)
Advertisement

another video example

💡 Pro Tips for REPT Formula

  1. Text Must Be inside Double Quotes "": If you type formula =REPT(*, 5) Excel will show error. Always put quote around text like =REPT("*", 5).
  2. Make In-Cell Bar Chart: Combine REPT("█", A2) or REPT("|", A2) with font Playbill or Impact to make mini bar chart inside cell!
  3. Handle Zero 0 or Empty Times: If number_times is 0, REPT formula will return empty text "". If number is negative (like -5), Excel return #VALUE! error!
  4. Pad Numbers with Leading Zeros: Need number 5 to show as 00005? Combine REPT with LEN like =REPT("0", 5-LEN(A2)) & A2.
  5. Combine with CONCAT or &: Use REPT together with & to join repeated symbol with text message (example: =REPT("⭐", B2) & " (" & B2 & "/5)").

📚 Related Tutorials

Found this tutorial helpful? Share it with colleagues:
📚

Related Tutorials

Opens in new tab ↗
Advertisement