Dealing with Text Length Limits and AutoFilter Drop-Down Lists

by Allen Wyatt
(last updated July 12, 2014)

1

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

Merging Graphics from Access

An Access database can store all types of data, including graphic images. Merging most data from Access into Word is ...

Discover More

Deleting All Footnotes

Tired of all those footnotes hanging on the bottom of each page in your document? You can get rid of them in one step, as ...

Discover More

Saving Information in a Text File

The VBA programming language provide with Excel allows you to create and modify text files quite easily. Here's how to open a ...

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)

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've got a column full of names, you may want to get a count of how many of those names are unique. You can make quick ...

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 an ...

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 6 - 0?

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.