REPT Function in Excel: Repeat Text (In-Cell Bar Charts)

REPT Function in Excel: Repeat Text (In-Cell Bar Charts) featured illustration

πŸ“Ž This article includes 1 downloadable practice file ↓

⏱ 2 min readUpdated 28 September 2026

TextLevel: IntermediateAvailable in: Excel 2007+

In this article
  1. Syntax
  2. Examples
  3. Example 1
  4. Example 2
  5. REPT in practice
  6. Where you will use it
  7. Worked example
  8. Mistakes people make
  9. Related functions
  10. Continue learning

REPT repeats text a number of times β€” best known for quick bar charts inside cells.

Advertisement

Syntax

=REPT(text, number_times)
Argument What it means
number_times How many times; decimals are truncated.

Examples

Example 1

=REPT("β–ˆ", B2/1000)

One block per β‚Ή1,000 of sales.

Example 2

=REPT("0", 6-LEN(A2)) & A2

Pad a code with leading zeros to six digits.

REPT in practice

Where you will use it

  • In-cell bar charts
  • Pad codes with zeros
  • Star ratings

Worked example

RatingFormulaResult
5=REPT("β˜…",A2)&REPT("β˜†",5-A2)β˜…β˜…β˜…β˜…β˜…
3=REPT("β˜…",A3)&REPT("β˜†",5-A3)β˜…β˜…β˜…β˜†β˜†
1=REPT("β˜…",A4)&REPT("β˜†",5-A4)β˜…β˜†β˜†β˜†β˜†

Results calculated in Excel.

Mistakes people make

MistakeWhat to do instead
Too many repeatsResult over 32,767 characters gives #VALUE!
DecimalsTruncated

TEXT Β· LEN

πŸ“š Part of the free Excel course: Beginner β†’ Expert Β· Try it in the Formula Lab or ask the AI Helper.

⚑ Interactive Practice Lab & Formula Tester:

Test formulas dynamically in our web formula laboratory or download the companion Excel workbook.

πŸ“Ž Practice files for this article

  • πŸ“—
    Practice workbook: Text & cleaning24 tasks on realistic sales data β€” type your formula, the Check column turns green when it is right. Answers sheet included.
    ⬇ XLSX Β· 35 KB

Free to use for learning. Files with macros (.bas) are plain text β€” import them with Alt+F11 β†’ File β†’ Import File, and always test on a copy.

✨ Ask AI about this article

Stuck on a step? Ask a question and the AI answers using this article.

Free Β· AI can be wrong