Please Note: This article is written for users of the following Microsoft Excel versions: 97, 2000, 2002, and 2003. If you are using a later version (Excel 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Excel, click here: Repeating Cell Contents.

Repeating Cell Contents

by Allen Wyatt
(last updated August 30, 2014)

10

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:

=REPT(12345,10)

This formula repeats the text "12345" ten times. 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. Select Cells from the Format menu. Excel displays the Format Cells dialog box.
  3. Make sure the Alignment tab is selected. (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."

If you later want the cell to behave as normal, simply change the formatting to normal by following the same steps and choosing a different alignment setting in the Alignment tab of the dialog box.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (3214) applies to Microsoft Excel 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) 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

Saving All Open Documents

Got a lot of open documents you are working with? You can save them all at one time by adding a handy tool to your Quick ...

Discover More

Notation for Thousands and Millions

When working with very large numbers in a worksheet, you may want the numbers to appear in a shortened notation, with an ...

Discover More

Displaying Keyboard Shortcuts

A quick way to accomplish tasks in any Google Drive application is to rely on a handy collection of keyboard shortcuts. There ...

Discover More

Excel Smarts for Beginners! Featuring the friendly and trusted For Dummies style, this popular guide shows beginners how to get up and running with Excel while also helping more experienced users get comfortable with the newest features. Check out Excel 2013 For Dummies today!

More ExcelTips (menu)

Using the REPT Function

Excel includes a handy function that allows you to repeat characters or strings of characters. How you use the REPT function ...

Discover More

Making PROPER Skip Certain Words

The PROPER worksheet function is used to change the case of text so that only the first letter of each word is uppercase. ...

Discover More

Concatenating Names with Delimiters

Need to come up with a formula for combining lots of text from various cells? Here's a full discussion on how you can do so ...

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}] 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 7 - 0?

2017-02-17 05:24:09

Aditay

hi
I have list in a columnn ,I want to repeat all text in three times as per below example
original data
--------------
Black
Blue
red

Result
--------
Black
Black
Black
Blue
Blue
Blue
Red
Red
Red

please help me out of this..


2016-12-31 09:30:19

Robin

There are two words that are the same in each cell...I'm typing a list of organizations that all have the same ending in their names. Is there a way to repeat this information and just change the beginning organizations' names?


2015-08-25 02:52:15

SRINI

i have excel cell like
282& 309
309&226
252&201
i want to count how much time repeates in column 309 itself in array


2015-02-24 07:48:43

Michael (Micky) Avidan

@segenay,
Would you be kind enough to present, us, a ScreenShot of where you found the "Remove Duplicates" in Excel 97-2003(!) - the versions this tip is, very clearly, referring to ?
Michael (Micky) Avidan
“Microsoft® Answers" - Wiki author & Forums Moderator
“Microsoft®” MVP – Excel (2009-2015)
ISRAEL


2015-02-23 11:49:05

segenay

Hi Somanka, highlight the values and then go to the data tab and choose "remove duplicates."

Greg, using the $ preserves the value. If you type =B$2+C$2, the 2s will stay when you drag it down. If you also need to drag left to right, uou can save the column value too by doing =$B$2+$C$2.


2014-09-10 15:07:52

Somanka Maitra

Hi Michael,

Thanks for the message. Sorry about the tardy response!

I did use this method but didn't get anything. It just returned a blank cell.

Any idea why?

Thanks again for trying.




2014-09-05 07:48:12

Michael (Micky) Avidan

@SOmanka,
Suppose your list resides in A1:A9.
In cell B2 (Not B1) type the following array formula and copy down:
=IFERROR(INDEX(A$1:A$9,MATCH(,COUNTIF(B$1:B1,A$1:A$9),)),"")
To confirm an Array formula - use the "three key combination".
While holding down CTRL+SHIFT press ENTER instead of just pressing ENTER.
Michael (Micky) Avidan
“Microsoft® Answers" - Wiki author & Forums Moderator
“Microsoft®” MVP – Excel (2009-2015)
ISRAEL


2014-09-04 10:34:45

Somanka Maitra

Hi. My question relates to a somewhat reverse process. Suppose I have the dataset as follows:

Black
Black
Black
Blue
Blue
Blue
Red
Red
Red
... and I just want to get to a list of the colours:

Black
Blue
Red

Can I use a shortcut?


2014-08-31 07:21:21

PhilP

@Greg

You need to use an Absolute cell reference. =$B$2+$C$2.

When copied down this put the same result in each copied cell


2014-08-30 20:26:41

Greg Mouning

I have a similar question but related to repeating (coping) the same formula down a column? For example, if I want to see the formula =B2+C2 in cells D2, D3, D4, D5 ... Currently, Excel iterates this formula down the column. For example:

D2 = B2+C2
D3 = B3+C3
D4 = B4+C4
D5 = B5+C5


This Site

Got a version of Excel that uses the menu interface (Excel 97, Excel 2000, Excel 2002, or Excel 2003)? This site is for you! If you use a later version of Excel, visit our ExcelTips site focusing on the ribbon 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.