FormulaCraft

How to repeat a character N times in Excel and Google Sheets

Topic:Text manipulation
Excel & Google Sheets
=REPT("-",B2)

Verified example

Computed by a real spreadsheet engine on the sample data below.

LabelCount
Stars3
Dashes5
Dots4
Equals2

=REPT("-",B2)---

Try it with your data

Edit the grid or formula, then run it through a real spreadsheet engine — no signup.

Sample data — click any cell to edit

Runs server-side · free · no signup

Step by step

  1. 1Click the cell where you want the repeated characters.
  2. 2Type =REPT( then enter the character or string in quotes, e.g., "-" or "*".
  3. 3Add a comma, then enter the number of repetitions — either a number directly or a cell reference.
  4. 4Close the parenthesis and press Enter.
  5. 5Example: =REPT("*",5) produces "*****" and =REPT("=-",3) produces "=-=-=-=-=-".

Tips

Need it for your exact data?

Describe your columns in plain English and get the precise formula for your sheet, with the right Excel or Sheets syntax.

Frequently asked

What is the maximum number of repetitions?

Excel allows up to 32,767 characters in a cell, so the repeat count multiplied by the character length must stay within that limit.

Can I repeat an entire word or phrase?

Yes — REPT works with any text, so =REPT("ha",3) returns 'hahaha'.

More on Text manipulation

See all →

Formulas used

Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.

Last reviewed: