Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, and 2013. 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: AutoFilling with the Alphabet.

AutoFilling with the Alphabet

Written by Allen Wyatt (last updated July 22, 2024)
This tip applies to Excel 2007, 2010, and 2013


4

Marlene is a teacher and she has students who love word searches. She finds it quite time consuming to make them, but the students seem to remember the course material much better when she uses them. Marlene wondered if there was some way to AutoFill a range of cells with letters of the alphabet, A through Z. That way she can use the feature to fill in the squares of the word search with letters, before she replaces some of those letters with the actual words to be searched.

The AutoFill tool in Excel has a few standard sequences it will fill automatically, such as dates and numeric sequences. The very powerful part of AutoFill, however, is that you can create custom lists that the tool uses just as easily as the built-in sequences. In order to create a custom list manually, you can follow these steps:

  1. Display the Excel Options dialog box. (In Excel 2007 click the Office button and then click Excel Options. In Excel 2010 and Excel2013 display the File tab of the ribbon and then click Options.)
  2. If you are using Excel 2007, make sure Popular is selected at the left of the dialog box. If you are using Excel 2010 or Excel 2013, click Advanced at the left of the screen and scroll down to the General area.
  3. Click Edit Custom Lists. Excel displays the Custom Lists dialog box and hides the Excel Options dialog box. (See Figure 1.)
  4. Figure 1. The Custom Lists dialog box.

  5. Select the NEW LIST option from the Custom Lists list at the left of the dialog box.
  6. In the List Entries box, enter each letter of the alphabet, one letter per line. (Press Enter after each letter you type.)
  7. When you are done, click the Add button.
  8. Click OK to finish.

To use the newly created custom list, just type one or two letters you want to start the sequence with, select those cells, and use the AutoFill handle to drag over as many cells as you want to fill.

There's another way to create the custom list that may be a bit easier, just in case you don't want to type twenty-six letters in the dialog box. Instead, if you already have the letters of the alphabet in twenty-six cells, follow these steps:

  1. Select the cells containing the letters of the alphabet.
  2. Display the Excel Options dialog box. (In Excel 2007 click the Office button and then click Excel Options. In Excel 2010 and Excel2013 display the File tab of the ribbon and then click Options.)
  3. If you are using Excel 2007, make sure Popular is selected at the left of the dialog box. If you are using Excel 2010 or Excel 2013, click Advanced at the left of the screen and scroll down to the General area.
  4. Click Edit Custom Lists. Excel displays the Custom Lists dialog box and hides the Excel Options dialog box. You should also notice that the range of cells you selected in step 1 is indicated just to the left of the Import button.
  5. Click the Import button. Excel adds the contents of the selected cells as a custom list.
  6. Click OK.

Of course, there is one drawback with using a custom list, especially when it comes to creating word searches: the letters added to blank squares are always in a predictable sequence, which could make finding the actual words a bit easier than you want. To make the puzzles a bit more challenging, it would be better to fill the non-word squares with random letters.

One easy way to get random letters is to use the following formula:

=CHAR(RANDBETWEEN(65,90))

This formula works because the RANDBETWEEN function returns a random numeric value between the two boundary values provided. In this case, it will return a value between 65 and 90, which are the ASCII values of the letters A and Z, respectively. The CHAR function is then used to convert this random numeric value into an actual letter.

If you create a lot of word search puzzles, then you may want to use a macro to fill a range of cells with random letters of the alphabet. There are any number of ways that such a macro could be put together; the following is one that is particularly flexible. It will work with either a pre-selected range (a range selected when you run the macro) or you can select a range after you run the macro.

Sub AlphaFill()
    Dim Cell, CellChars
    Dim Default, Prompt, Title
    Dim rangeSelected As Range
    Dim UpperCase As Boolean

    Title = "AlphaFill Cell Selection"
    Default = Selection.Address
    Prompt = vbCrLf _
      & "Use mouse in conjunction with " _
      & "SHIFT and CTRL keys to" & vbCrLf _
      & "click and drag or type in name(s) " _
      & "of cell(s) to AlphaFill" & vbCrLf & vbCrLf _
      & "Currently selected cell(s): "
      & Selection.Address

    On Error Resume Next
    Set rangeSelected = InputBox(Prompt, Title, _
      Default, Type:=8)
    If rangeSelected Is Nothing Then Exit Sub

    UpperCase = True
    Randomize
    For Each Cell In rangeSelected
        CellChars = Chr(64 + Int((Rnd * 26) + 1))
        If Not UpperCase Then CellChars = LCase(CellChars)
        Cell.Value = CellChars
    Next
End Sub

The macro code, as written, inserts the uppercase letters into whatever range you specify. If you want to use lowercase letters instead, then all you need to do is set the UpperCase variable to False rather than True.

Note:

If you would like to know how to use the macros described on this page (or on any other page on the ExcelTips sites), I've prepared a special page that includes helpful information. Click here to open that special page in a new browser tab.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (7803) applies to Microsoft Excel 2007, 2010, and 2013. You can find a version of this tip for the older menu interface of Excel here: AutoFilling with the Alphabet.

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

Toggling Font Assignments in a Macro

If you need to quickly switch a text selection from one typeface to another, one way you can do it is with a macro. This ...

Discover More

Adding Hyperlinks

Adding a hyperlink to s text selection is easy to do in Word. All you need to do is make a couple of clicks and specify ...

Discover More

Rotating a Page of Text

You can rotate a page of text by using the Far East language support built into Word. This tip shows how easy it is to ...

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 (ribbon)

Turning Off AutoFill

AutoFill is a great editing tool that comes in particularly handy when you are first creating a worksheet. You may, at ...

Discover More

AutoFilling from a Custom List

AutoFill can be a real timesaver if you often work with set lists of data. You can define your own custom lists and then ...

Discover More

AutoFilling with Weekdays

Need to fill a range of cells with the days of the week? Excel makes it easy to do so using AutoFill.

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 less than 3?

2016-01-11 19:57:01

Leslie Glasser

A simple way to insert capitals in a column is to use =CHAR(ROW()+64) in successive rows starting from row 1. Use 96 in place of 64 for lower case.

If you want to start in a lower row use =CHAR(64+ROW(OFFSET(A1,0,0))) where A1 can be any cell in the top row.


2016-01-11 09:21:32

Jeaux Brown

LOVE the simple tip of adding custom lists. Thank you.


2016-01-11 08:22:51

Dawn Molitor

For Marlene, the teacher, who wants to autofill alphabets for word search puzzles:

Excel is awesome, but there is a website for teachers that makes word searches and crosswords (and the answers) on the internet in just a few minutes (for free). You simply put in the words you want, and how wide and tall, and in a few seconds, you have your puzzle. You can then click on the answer sheet.
Here is the site:
http://puzzlemaker.discoveryeducation.com/WordSearchSetupForm.asp


2015-06-17 21:41:33

silvex3000


Tremendous - ABC AutoFill (AutoHotKey):
https://www.youtube.com/watch?v=xbU-5hYgK7w

extra options:
https://www.youtube.com/watch?v=ZfPPVzH8xKQ


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.