Excel has a handy little feature that lets you quickly fill in a list of items, and even sort by that list. There are a handful of built-in lists, and Excel lets you define your own custom lists.
I’ll show how these lists work with the built-in lists, then I’ll show how to add your own custom lists. Finally, I’ll share a little program that I’ve built to manage some specific custom lists that I use frequently.
Built-In Lists
Say you want a list of months. Type “Jan” into a cell, then drag the handle at the bottom corner of the cell. Excel extends the list to fill the cells included in your drag. You can drag to fill Jan to Dec, and if you go past Dec, the list continues again with Jan. And you don’t need to start with Jan, you can start anywhere in the list, and Excel is smart enough to fill it.
There are other tricky fills you can perform with lists. You can enter Jan into a cell, and drag upward, and Excel will fill backwards. You can enter Jan and Apr into two cells (the first months of quarters 1 and 2), then select the two cells and drag, and Excel will continue to fill with Jul and Oct (the first months of quarters 3 and 4). You can enter two months in reverse order (Dec and Nov below), select the two months, then drag to fill in reverse order.
In the figure below, I illustrate horizontal fills with the built-in list of days of the week.
Another smart thing about lists is that Excel picks up the capitalization of the first item and applies it to the other items in the filled range. Below you see how Excel has filled with initial caps, all caps, and no caps.
Excel has four built-in lists you can use: month abbreviations, month full names, day of week abbreviations, and day of week full names.
Hidden Lists
In addition to the built-in lists shown above, which can be viewed in the Excel user interface (described later), there are numerous other lists that just seem to work.
Numbers themselves can act as a list. If you select a number (first example below) and drag it, you simply get a string of that number. Not very useful. But if you select an adjacent cell, like the blank in the second example or the random text in the third, the blank or random text are repeated, while the number increments. If you select the first two numbers in a sequence, dragging will continue the sequence. If the numbers are not consecutive, the sequence continues with the same spacing as in the initial selected values.
If you select more than two initial numbers, extending the sequence will fill in values from an extended trendline, as if they were computed using TREND() or FORECAST().
If the starting value is an arbitrary string that ends with a number, extending the list appends sequential numbers to the string. If two values are selected, then the extended sequence uses the spacing between the selected values.
In addition to the built-in lists based on Day and Month names, there are several other interesting date-based sequences. Selecting and dragging a date fills the range with subsequent dates. No need to select a helper cell as with regular numbers. Selecting two dates defines the spacing of the generated sequence.
It works with times, too.
You can use Q1, Qtr 1, or Quarter 1, and the sequence will generate the quarters of the year. It’s smart enough that after the fourth quarter, Excel starts counting again with the first quarter (presumably of the following year).
Another neat sequence is with ordinal numbers.
Sorting with Lists
Just as you can sort numerically, you can also sort with lists. Below is a small Table with a column of month abbreviations. They are listed in the least useful sort order, alphabetical. If I click on the filter dropdown in the Table header, I have choices to sort A to Z or Z to A. Using Sort A to Z is probably how the months ended up in this unfortunate order.
But if I go to the Home tab of the ribbon and click Sort & Filter, I also see an option for a Custom Sort.
This brings up the Sort dialog, and in the Order setting, I see an option for Custom List.
Clicking this option brings up the Custom Lists dialog, and below I’ve selected the month abbreviation list that I want to sort by.
After clicking OK a couple times, now I’ve got my months sorted chronologically. And now, if I use the A to Z and Z to A sorts on this column, it remembers it’s associated with the list, and it sorts forwards and backwards by the same list.
To sort by a built-in list, I had to access the Custom Lists dialog. So how do I add a custom list?
Custom Lists
You can get to the Custom Lists dialog by clicking on the File tab of the ribbon, then clicking Options, then clicking Advanced in the dialog. Scroll way down, and almost at the bottom is the button for Edit Custom Lists.
This brings up the Custom Lists Dialog.
Click in the List Entries box, and start typing your list. Press Enter to separate list entries.
Click the Add button, and your list is added to the options. Note that the selected list is enumerated in the List Entries box. You can add, delete, and edit these entries, and click Add to save your changes.
If you select a range, then open up the Custom Lists dialog (via File > Options > Advanced), you can import the selection as a new list. The range is prepopulated in the box next to the Import button.
Clicking Import adds your range to the list. You can click the arrow button next to Import to add a list from another range.
The dialog now shows my usual setup with four custom lists: the Latin alphabet, the Greek alphabet, the military call signs used to communicate letters, and a list of counting numbers from 1 to 12. I find these useful when I’m doing a demo or workshop and I need to quickly generate a list of categories for a chart.
Whenever I set up Excel on a new computer, one of the first things I do is set up these custom lists. (I should write a post that details all of the first things I do when I set up a new account. Then I could read it and do everything, and not remember some things weeks later.) This usually entails opening a file that has these lists laid out in a worksheet. But even this seems to be too slow sometimes.
Custom List Manager
To facilitate the creation of my favorite custom lists, I built a little tool called the Custom List Manager (click on that link to download it). It’s a regular Excel macro-enabled workbook. A sheet called Built-In Lists will look familiar, because I took screen shots of it for earlier sections of this post. Another sheet called Custom Lists contains these lists:
A third sheet, called Sample Lists, has some lists you can play around with.
When you open the workbook, a new ribbon tab appears.
When you click the Custom Lists button on this tab, you get the following dialog. For each of my standard custom lists, there is a button to add it and another to remove it. Depending on whether the list is present, one or the other of these buttons is enabled. There is also a button which will add lists using columns of a range you’ve preselected.
Try out this little tool. The VBA code is unprotected so you can prowl around its inner workings. Let me know if you like it, and if you have any suggestions.
Mark says
Hi Jon,
I didn’t know Custom lists were clever enough to keep consistent intervals as you drag them. That’s a useful little trick.
I’d be interested to know what things you do to set-up Excel on a new computer.
Thanks
Mark
Jon Peltier says
Mark –
I’m outlining my steps for a new post, but here’s a “short” list. There’s probably more.
Excel Settings:
– Customize Ribbon: Show Developer Tab
– Customize QAT: Switch Windows and Select Objects (anything else would become clutter)
– 1 sheet in new workbooks
– Don’t show start screen when Excel starts
– Don’t move after Enter key is pressed
– Default save format: xslm
– Custom Lists (this article)
VB Editor Settings:
– Require Variable Declarations
– Uncheck: Auto Syntax Check
– Tab Width: 2
– Show Grid, 3 x 3 Points
– Undock Immediate Window
My Add-Ins:
– Install: Peltier Tech Charts for Excel
– Install: Jon’s Stuff (neat little stuff I use a lot)
– Make Available: VB Component Processor
Third-Party Excel Add-Ins:
– XL Guru File Tools (Ken Puls)
– Name Manager (Jan Karel Pieterse)
– Center Across Selection – Chris Newman
Third-Party VBE Add-Ins
– MZ Tools
– Code Cleaner (AppsPro)
– Smart Indenter (OALTD)
Miscellaneous Files:
– Various Custom Themes (for Colors)
– Assorted Templates (mostly Word)
Registry Hacks:
– Disable Date Auto Grouping in Pivot Tables
– Disable Animations
– NoReReg if I’m running multiple Office versions
– Enable Debugging of PowerPoint Add-Ins
Mark says
I do some of those already, but others are new to me, which I should look into.
I tend to avoid the registry stuff, as I just don’t know what I’m doing with it. But I should learn.
Thanks.
Jeff Weir says
It’s about time Microsoft upgraded Custom Lists, and made them accessible via the Name Manager. Not being able to assign Custom Lists a name is a pain in the ass. And so are the limits. From memory, no one item can be longer than 255 characters, and you can’t have more than 254 items, or 1818 characters in total. Those might have changed.
Neale Blackwood says
Hi Jon
Thanks for a comprehensive post on a little used feature.
I tried clicking the Custom List Manager link and it just opened a page of random characters.
Regards
Neale
Jon Peltier says
Neale –
Right click on the link, then choose Save Link As to save it to your computer.
Neale Blackwood says
Thanks Jon – done.
Sam says
There are some more buried deep into Excel
Eg. Type Q1 or Qtr1 and drag it down
Or Type 1st and drag it down
Or type XL1 and drag it down or XL01 and drag it down
Jon Peltier says
Sam –
Good point.
The cool thing about Q1, is it goes Q1 Q2 Q3 Q4 Q1, starting with the first quarter of the next year.
I have added a section on “Hidden” Custom Lists.
BeeJay says
Thanks for the nice tool.
the option add from “Columns of Selected range” is almost exactly what I’m looking for. However as my range is dynamic I would like to have the option to remove the “Old” list and have it replaced by a new list. Otherwise I end up with a lot of list to choose from.
is that possible?
Jon Peltier says
BeeJay –
I have been working on an updated List Manager which includes the ability you describe. When it’s ready, I’ll make it past of my commercial Excel add-in.
Alan Olrog says
Hello Jon,
I arrived at your page while looking for a way to sort a worksheet in VBA using a custom sort order (I thought that creating a custom list was the only way but I discovered it seems to be as simple as adding “SortField.CustomOrder:=” and defining a string with comma-separated elements: e.g. “1, 15, 2, 25, 3, 35”).
Thanks for the useful information about Built-in and Custom lists, only some of which I knew. I realised years ago that, while you could type a single month or day name and then drag to create a series, it didn’t work with a single numeric value (as you say). The adjacent blank cell trick you describe is interesting, but another “quirk” is that Ctrl + drag on a single number will produce a list that increments by one. Interestingly, Ctrl + drag on a day, month, ordinal etc. simply replicates the value, just as dragging alone does with a cardinal number.
I will now be looking into your Custom List Manager. Many thanks!