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

⏱ 1 min readUpdated 28 September 2026

TextLevel: IntermediateAvailable in: Excel 2007+

In this article
  1. Syntax
  2. Examples
  3. Example 1
  4. Example 2
  5. Related functions

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

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.

TEXT · LEN

📚 Part of the free Excel course: Beginner → Expert · Try it in the Formula Lab or ask the AI Helper.

✨ Ask AI about this article

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

Free · AI can be wrong