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

Searching for Paragraph Formatting

You can use the Find and Replace capabilities of Word to search for a wide variety of information. One thing you can look ...

Discover More

Changing Outline Structure

When working with the outline of a document, you can easily move whole sections of your document. It is as easy as ...

Discover More

Viewing Formula Results

When editing information in a cell, you may need to know the result of a portion of your formula. The shortcut described ...

Discover More

Create Custom Apps with VBA! Discover how to extend the capabilities of Office 365 applications with VBA programming. Written in clear terms and understandable language, the book includes systematic tutorials and contains both intermediate and advanced content for experienced VB developers. Designed to be comprehensive, the book addresses not just one Office application, but the entire Office suite. Check out Mastering VBA for Microsoft Office 365 today!

More ExcelTips (ribbon)

Setting Cell Color Based on Numeric Values

Excel allows you to specify colors for the interior of cells in your worksheet. If you want those colors to be set ...

Discover More

Setting a Default Date Format

Enter a date into a cell, and Excel allows you to format that date in a variety of ways. Don't see the date format you ...

Discover More

Drawing Borders

Adding borders around cells is a common formatting task. You can make the task more intuitive by actually drawing the ...

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 three more than 8?

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.