Excel REPT Function: Syntax, Examples & Tips

The REPT function repeats text a specified number of times, enhancing data presentation and formatting in Excel.
Excel
=REPT(text, number_times)

One free generation or explanation per browser, shared across Excel and Google Sheets. Account usage limits apply afterward.

Need more than a single REPT formula? Try our free AI for Excel — it reads your entire spreadsheet, answers questions in plain English, and builds charts and analysis in the same chat.

On this page
  1. Parameters
  2. What is a REPT Formula in Excel?
  3. A Practical Example
  4. REPT Formula
  5. Result of the Formula
  6. Why Use REPT?
  7. Key Takeaways:
  8. Example use case

Parameters

text:
The text string that you want to repeat.

number_times:
The number of times you want the specified text to be repeated. This must be a positive integer.

What is a REPT Formula in Excel?

The REPT function in Excel is a simple yet powerful tool that allows you to repeat a text string a specified number of times. This function is particularly useful for creating visual representations of data, formatting output, or generating custom text strings based on certain criteria.

In simpler terms, the REPT function helps you repeat a piece of text as many times as you need, making it easier to create patterns or enhance the presentation of your data.

A Practical Example

Imagine you are preparing a report and want to create a visual representation of performance metrics using asterisks. You have the following data in an Excel spreadsheet:

Performance Data Table:

EmployeePerformance Score
Alice5
Bob3
Charlie4
David2
Eve1

You want to create a visual bar chart using asterisks to represent each employee's performance score.

REPT Formula

To create a visual representation for Alice's performance score, you would use the REPT formula as follows:

Excel
=REPT("*", B2)

Breakdown of the Formula:

  • "*": This is the text string that you want to repeat (in this case, an asterisk).
  • B2: This is the number of times the text string will be repeated, based on the performance score.

Result of the Formula

When you apply the formula for each employee, it will generate a string of asterisks corresponding to their performance scores. The output would look like this:

EmployeePerformance ScoreVisual Representation
Alice5*****
Bob3***
Charlie4****
David2**
Eve1*

Here, the visual representation is created by repeating the asterisk based on the performance score of each employee.

Why Use REPT?

The REPT function is particularly useful when you want to create visual aids directly in your spreadsheets without using charts or graphs. It allows you to quickly generate patterns or representations that can enhance the readability and presentation of your data.

Key Takeaways:

  • REPT: Repeats a text string a specified number of times.
  • Visual Representation: Helps create simple visual aids using text characters.
  • Common Use Cases: Ideal for performance metrics, data visualization, and enhancing the presentation of reports.

Understanding how to use the REPT function can significantly improve the way you present data in Excel, enabling you to create engaging and informative reports.

Happy repeating!

Example use case

You have a table where Column A contains employee names and Column B contains their corresponding performance ratings on a scale of 1 to 5. You can use the REPT function to create a visual representation of each employee's performance by generating a bar of asterisks in Column C, where the number of asterisks corresponds to their rating. This allows for a quick visual assessment of employee performance, making it easier to identify high performers and areas that may need improvement without the need for complex graphical tools.

Beyond the REPT function: Better Analyst is a full Excel AI that goes well past individual formulas. Upload any spreadsheet and ask questions in plain English — you'll get formulas, data analysis, and charts back in seconds. It's a free AI Excel assistant that works with any .xlsx, .xls, or .csv file — no plugins, no Microsoft 365 required.

Don't have a spreadsheet yet? Use our free AI spreadsheet generator to turn a text prompt into a downloadable Excel file — a full AI Excel sheet maker that builds headers, columns, and formulas from your description.

Need more help with Excel formulas?

Create a free account for formula help, explanations, and spreadsheet analysis. Usage limits depend on your plan.

Explore all Excel formulas

Browse our complete library of Excel formula guides

Compare your options

Decide with evidence, not a sales pitch.

Open a neutral research prompt in the AI tool you already use. Compare capabilities, limitations, and fit before you choose.

  1. 01ChatGPTOpen a balanced comparison prompt in ChatGPT.
  2. 02ClaudeOpen the same research prompt in Claude.
  3. 03PerplexityResearch the comparison with linked web sources.

AI answers can be incomplete. Check source links, current pricing, and product documentation before deciding.