Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, 2016, 2019, 2021, 2024, and Excel in Microsoft 365. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Repeating Cell Contents.

Repeating Cell Contents

Written by Allen Wyatt (last updated August 1, 2026)

2

If you need to repeat cell contents within a cell, there are two ways that you can approach the task. The first is with a formula, using the REPT worksheet function:

=REPT(12345,10)

This formula repeats "12345" ten times. It is interesting that Excel allows the result of the REPT function to be used in numeric formulas, provided you are repeating numeric values. Consider the following:

=REPT(123,2)

This results in 123123 being displayed in a cell. (Let's say it is in cell A1.) You can then use a formula such as this:

=A1+7

The result is 123130, which means that Excel treats the result of REPT as a number, when it can. If you want to actually repeat text, then you need to enclose the first parameter within quote marks, such as the following:

=REPT("abcd",10)

Using the REPT function works well if you know exactly how many times you want to repeat the contents, but not so well if you don't. This leads to the second approach, which is to use formatting for the cell. Follow these steps:

  1. Select the cell or cells you want to format.
  2. Make sure the Home tab of the ribbon is displayed.
  3. Click the small arrow icon at the bottom-right of the Alignment group. Excel displays the Alignment tab of the Format Cells dialog box. (See Figure 1.)
  4. Figure 1. The Alignment tab of the Format Cells dialog box.

  5. Using the Horizontal drop-down list, choose Fill.
  6. Click OK.

The result is that the cell formatting in this way will repeat whatever it contains as many times as it can fit that result into the cell. If the cell is not wide enough to display even one occurrence of the result, then you will see the familiar #### markers. The cell will only display entire occurrences of the result, not partial occurrences. Thus, it will display "1234512345," but not "1234512345123." This means that you may end up with empty space at the right side of a cell if Excel cannot fit into the cell another full instance of what you are repeating.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (6171) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, 2021, 2024, and Excel in Microsoft 365. You can find a version of this tip for the older menu interface of Excel here: Repeating Cell Contents.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Printing More than One Copy

If you need to print more than one copy of your document, you need to become familiar with the printing options made ...

Discover More

Jumping To a Comment

Got a document with lots of comments in it? You can navigate from comment to comment with ease by using the Go To tab of ...

Discover More

Odd Page Numbers Disappearing

Page numbers in printed pages are often a necessary part of formatting a document. What do you do if your printed output ...

Discover More

Solve Real Business Problems Master business modeling and analysis techniques with Excel and transform data into bottom-line results. This hands-on, scenario-focused guide shows you how to use the latest Excel tools to integrate data from multiple tables. Check out Microsoft Excel Data Analysis and Business Modeling today!

More ExcelTips (ribbon)

Adjusting Center Across Selection with a Cell Value

One of the most common cell alignment settings I use is the one to center across a selection. If you want to vary how ...

Discover More

Changing the Default Vertical Alignment

By default, Excel vertically aligns cell contents to the bottom of cells. If you prefer a different default alignment, ...

Discover More

Formatting Currency

If you want to format currency values so that Excel uses periods between groups of thousands and commas as a decimal ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is seven minus 1?

2026-08-03 11:50:32

J. Woolley

Re. Figure 1 of the Tip, I think the Horizontal Fill feature works best when only 1 or 2 characters are repeated to fill the cell. Here are some examples (see Figure 1 below)


Figure 1. 




2026-08-01 07:34:41

Philip

Actually, REPT() returns a text by default. Your argument should be text or a reference to text. If it's a number, Excel will make a text out of it. Just check the default alignment of the result of the formula (it aligns to the left, just like any text does).

The reason why you can add the result to a number, is because the arithmetic operators try to interpret any text data they get into numbers and if that's successful they will perform their calculation.

Try the same with the SUM() function, and you'll see the REPT() result gets ignored ... A way around that is to convert the REPT() result to a number explicitly (e.g. by using the double unary e.g. --REPT() or multiply the result with 1 using 1*REPT() ...)


This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.