Dealing with Text Length Limits and AutoFilter Drop-Down Lists

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


2

Alan often uses Excel to organize text-based information. He uses the AutoFilter tool to view data with common elements. He noticed that cells with more than 254 characters do not display in the AutoFilter drop-down checklist area. As many of his worksheets have cells with character counts above 254, the limitation means he cannot view all relevant data using AutoFilter. (Alan knows he can use the text filter option to get the results he wants.) He wonders if the 254-character limit on what displays in the AutoFilter drop-down list is an inherent limitation of Excel or if there is something that can be done to cause these cells to display in the drop-down.

It appears that the 254-character limit is built into Excel. While the number of items that can be displayed in the drop-down list has increased over the the last several versions (it is now set at 10,000 items), the length of those individual items is still limited to 254 characters.

How, then, to get around this limitation? The only potential workaround that I could come up with is to use a separate column that pulls out the unique information in a cell and then you can filter on that column. For instance, the formula in the cell could look at the length of the text in the original cell, and if it is more than 254 characters and those 254 characters are the same as the 254 characters in the next or previous cell, then it pulls the next 254 characters into the cell. If they are not the same, then the formula pulls the first 254 characters from the cell.

The rationale behind such an approach is that if the text in a range of cells has the first 254 characters all the same, then those 254 characters are of little value in differentiating the contents of one cell from another. By pulling 254 characters that are more appropriate for differentiating the cell contents, then you can filter the cells more meaningfully.

Of course, if the information you are working with in Excel is pulled from an external source (such as a database), then you might want to consider modifying how the data is generated or pulled so that a more limited (and meaningful) text string is worked with. For instance, you might modify the routines used to generate data so that common prefixes are eliminated or common phrases are replaced with abbreviations of some sort.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (13164) applies to Microsoft Excel 2007, 2010, and 2013.

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

Quickly Identifying Applied AutoFilters

Apply an AutoFilter to a worksheet, and you can quickly forget exactly what that AutoFilter entailed. Here are a couple ...

Discover More

Changing Excel's Background Color

Excel doesn't provide a built-in means to change the standard background color of a worksheet. There are a few different ...

Discover More

Summing Cells Using a Particular Background Color

Do you need to total all the cells that are a particular color, such as yellow? This tip looks at three different ways ...

Discover More

Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 today!

More ExcelTips (ribbon)

Toggling AutoFilter

Want a tool that will help you toggle AutoFilter on and off? Excel provides some tools you can use, but you need to be ...

Discover More

Getting a Count of Unique Names

When you have a column full of names, you may want to get a count of how many of those names are unique. You can make ...

Discover More

Using AutoFiltering

Excel's AutoFilter tool is a great way to make a long list of items much more manageable. This tip explains how to set up ...

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 one less than 9?

2018-05-08 02:37:53

Saskia

I don't understand the problem! I am working with Excel 2016. I have a filtered area with a column containing more than 254 characters: I see them all.
Can you show me an example when this problem occurs?


2014-07-13 16:07:22

Ashley

You could also just use another column to find the information you need. If your text in column G for example, then in column F (or wherever) you could use =not(iserror(find("search text", g2))). Then, when you turn your auto-filter on, you could just select the "TRUE" values in column F. This doesn't solve you display issue for the drop down filter list, but you probably shouldn't be storing that much text in a single cell anyway (in my humble opinion).
I hope this helps.


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.