Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, 2016, 2019, and Excel in Office 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

by Allen Wyatt
(last updated July 25, 2020)


Julius is a former Lotus 1-2-3 user. He notes that in that program, if he presses the "\" key and follows it with anything, Lotus will repeat what he types to fill the entire cell. For example, if he types \12345, Lotus will show 123451234512345..., regardless of the width of the cell. Julius is wondering how to do the same in Excel.

There are a couple of ways you can do this. One is with a formula, using the REPT worksheet function:


This formula repeats "12345" ten times. If you want to actually repeat text, then you need to enclose the first parameter within quote marks, such as the following:


This approach works well if you know exactly how many times you want to repeat the text, 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, and Excel in Office 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. ...


Creating a Workbook Clone

If you are afraid of messing up a workbook, consider doing your work on a clone of the workbook. Excel provides an easy ...

Discover More

Updating Fields in Locked Forms

Updating form fields in Word can be confusing, especially when the fields are locked in a form. This tips explains why ...

Discover More

Choosing How to Use Multiple Monitors

Do you have multiple monitors (or a projector) hooked up to your system? Here's how to utilize that second display device ...

Discover More

Professional Development Guidance! Four world-class developers offer start-to-finish guidance for building powerful, robust, and secure applications with Excel. The authors show how to consistently make the right design decisions and make the most of Excel's powerful features. Check out Professional Excel Development today!

More ExcelTips (ribbon)

Cycling through Colors

If you need to easily change the font colors in a group of cells, one of the esoteric commands Excel provides is the ...

Discover More

Adjusting Cell Margins for More White Space

Is the information in your cells too jammed up? Here are some ways you can add some white space around that information ...

Discover More

Displaying Negative Times

Excel allows you to perform math using times as operands. If you subtract a later time from an earlier time, you should ...

Discover More

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

View most recent newsletter.


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}] 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 9 + 6?

2020-07-27 09:53:12


Not using "Fill" as a formatting option, by the way, just the formula given. A closer reading... DOES show the 'only 12345, not 12345123' parrrt refers only to the Fill formatting, not to the REPT() function. I imagine that's why I get "different" results...

2020-07-27 09:48:52


Looks like there is a way to attach images so... this is what I get. (see Figure 1 below)

Version is: "Version 2006 (Build 13001.20384 Click-to-Run)"

Figure 1. 

2020-07-26 03:57:49



Really strange. I am getting the exact opposite. I can't duplicate your "12345123" example - my results are always truncated, wrap text seems to do nothing, and my result does change dynamically as I change the column width.
I can't test the Shrink-to-Fit as it's greyed out when I select Fill from the horizontal alignment.
If this is due to different versions (I'm using Excel 2010), it seems like this feature is too unpredictable to use when sharing a workbook.

2020-07-25 18:25:58


Ehh... not that dynamic a re-sizing. One and done is more like it.

2020-07-25 18:09:42


Well, not so much on a couple points.

First, it WILL give "12345123" rather than "1234512345", "12345", or bust. Doesn't have the least issue doing so.

Second, "Shrink to fit" (STF) works interestingly and obviously.

If nothing to the right interferes, it will pour over the border. (STF stops that.)

"Wrap text" does exactly that. (Overcomes STF as well.)

I've never seen a point to this function anyway, as it seems it would only be of value for a border, or, as occurs to me today, an interesting way of changing the row height, perhaps used to dynamically do so for changes in content of another cell in the row, though that seems redundant as that cell could be made to dominate its own fate. Anyhow, never used it, ever. So I won't say the above facts obtained in every copy of Excel along the way, just right now.

But the Tip says it was last edited RIGHT NOW. So... concerns arise.

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

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.