Contextures

Filters > AutoFilter > Troubleshoot

AutoFilter Tips & Troubleshooting

Remove Excel Filter Mode message in status bar, Excel Autofilter limit and workarounds, number the visible rows in filtered list, stop filter drop down date grouping, and how to filter long text strings.

Video: Problem Pasting in Filtered List

This video shows the problems that you can have when you try to copy and paste data into a filtered list. See why the problem occurs, and a couple of workarounds, to avoid the problem. Also, watch the second video, to see a keyboard shortcut for pasting in filtered rows.

Tip: To follow along with these videos, go to the Filtered List Paste Problems page and download the sample file.

If you are copying and pasting in the same rows in a filtered list, you can use the shortcut Ctrl + R, to fill right, or use a Ribbon command to fill left. Watch this video to see the steps.

Ungroup Dates in Filter Drop Down

By default, when you turn on an AutoFilter, dates are grouped in the drop down list. You can turn this feature off, to show the full list of dates.

Watch this short video to see the steps for turning off date grouping in an Excel filter. Written instructions are below the video.

Ungroup Dates in Filter Drop Down

By default, when you turn on an AutoFilter in Microsoft Excel, dates are grouped in the drop down list.

filter date grouping

You can manually change a setting, to ungroup them in the current workbook. You can also use programming to turn the grouping on or off.

Follow these steps to turn off the Date Grouping feature in the current workbook:

  1. On the Ribbon, click the File tab, then click Options
  2. Click the Advanced category
  3. Scroll down to the Display Options for This Workbook section
  4. Remove the check mark from Group Dates in the AutoFilter menu.
  5. Click OK to apply the setting change.

Limits to AutoFilter Drop down Lists

In Excel 2003, and earlier versions, an AutoFilter drop down list will only show 1000 entries. As a result, in a large database, the AutoFilter feature drop down may not show all the items in the column. (This limit was raised to 10,000 in Excel 2007.)

You could add a new column, and use a formula to split the list into two groups, e.g.:
   =IF(LEFT(C2,1)<"N","A-M","N-Z")

long text formula groups

or

to split the list into three groups, nest one IF formula inside another, e.g.:
   =IF(LEFT(C2,1)<"I","A-H",IF(LEFT(C2,1)<"Q","I-P","Q-Z"))

Or, for a column with thousands of unique entries, use a formula which extracts the first two or three letters, e.g.:    =LEFT(C2,2)

Filter on this column first, then by the intended criteria.

filter by group column first

Filter Mode in Status Bar

Normally, after you have applied an AutoFilter, the Status Bar shows a count of visible records.

status bar record count

Sometimes it just says, "Filter Mode."

status bar filter mode

You can see the Filter Mode problem and workarounds in the following video, and written instructions are below the video

Why Filter Mode Appears

Workaround #1 - Subtotal

Workaround #2 -- Status Bar AutoCalc

Why Filter Mode Appears

This can happen when your list has many formulas. There are articles in the Microsoft KnowledgeBase that explain:

XL2000: Excel AutoFilter Status Bar Message Shows "Filter Mode" Q213886)

XL: AutoFilter Status Bar Message Shows "Filter Mode" (Q189479)

The Status Bar will also show "Filter Mode" if anything is changed in the list, after a filter has been applied. For example, if you format a cell, or type a number in one of the records, the 'Filter Mode' message will appear in the Status Bar.

Workaround #1 -- Subtotal

For a record count of the visible rows which contain data, you can use the Subtotal function in a formula in the same row as your headings. For example, to count the visible entries in column D which contain numbers, you could use this formula:
      =SUBTOTAL(2,D:D)
The 2 in the first argument tells Excel to use the COUNT function on the visible cells in the range.

subtotal formula

To count rows that contain text, you could change the formula:
      =SUBTOTAL(3,C:C)-1
The 3 is for the COUNTA function, and the -1 removes one for the row which contains the column heading.

NOTE: Blank cells will not be counted -- use a column with no blank cells.

Workaround #2 -- Status Bar AutoCalc

(from Dave Peterson)

  1. Select a column that you know has data in each cell.
  2. Right-click on the embossed area at the right side of the status bar.
  3. Choose Count -- it'll tell you how many are in the selected cells.
  4. If you included the header rows, subtract them.

status bar count function

To see how many total rows, choose Data>Filter>Show All, select a column that has data in each cell, and look at the bottom of the screen.

With this feature you can also get Min/Max/Average/etc. with just simple mouse clicks and selections.

Number Visible Rows Only, in Filtered List

If you need to print a filtered list, a helpful trick is to use the Excel AGGREGATE function, to number only the visible rows in that list.

In the animated screen shot below,

  • Using a Slicer, the list is filtered to show a specific product - Paper or Staplers
  • AGGREGATE formula in column B numbers the visibile rows -- 1, 2, 3, 4
  • Numbers change to show correct sequence, ignoring hidden rows

aggregate function

AGGREGATE Formula to Number Visible Rows

Here is the formula in cell B2, and the formula was automatically copied down to the other table rows below:

  • =AGGREGATE(2,3,C$1:C2)

There are 3 required arguments in the AGGREGATE formula syntax:

  1. function number: 2 is the code number for the COUNT function -- it will count numbers in the visible rows
  2. Options: 3 is the options setting, to tell Excel what to ignore
  3. Ref1: C$1:C2 is the range with numbers (dates) to count.
    • The starting point is locked at row 1 (C$1), and goes down to the current row (C2).

Last Row Stays Visible

If you use AGGREGATE or SUBTOTAL formulas in a filtered list, the last row might always be visible, even if it does not meet the filter criteria. If that happens, it's because:

  • Excel has decided the last row is special, and contains Totals for the table columns.
  • In an Excel table, the Total row is not included in the filter range, so that's why the row stays visible.

If you have a problem with the last row remaining visible, add two minus signs after the equal sign.

Note: I added spaces, to make it easier to see the minus signs at the start of the formula:

  • = - - AGGREGATE(2,3,C$1:C2)

After you add those minus signs, Excel should stop treating the last row as the table's Totals row.

AutoFilter for Text in a Long String

You can use the Custom option to filter for cells that contain specific text. However, if the text is located after the 255th character in the cell, it won't be found. Also, the long text strings don't appear in the drop down list in the heading cell.

autofilter long string

As a workaround, enter the search text string in a cell on the worksheet. Then add a formula to check for the text.

  1. Insert a new column in the database, and in the heading cell, type the word you're searching for, e.g.: Shop
  2. Enter the following formula in row 2 of the new column:
       =ISNUMBER(SEARCH($B$1,A2))
  3. isnumber formula

  4. Copy the formula down to the last row
  5. Filter column B for TRUE
  6. To filter for a different word, type a new string in cell B1, and reapply the filter in column B.

Note: SEARCH is not case sensitive. For a case sensitive filter, use FIND, e.g.:
     =ISNUMBER(FIND($B$1,A2))

Get the Sample File

AutoFilter Tips: Get a zipped Excel AutoFilter workbook with sample data.

Copy Paste Filter: Download the Filtered List Copy Paste sample file used in the videos on this page. The zipped Excel file is in xlsx format, and does not contain macros

More Filter Tutorials

AutoFilter Basics

AutoFilter Programming

Filtered List Paste Problems page

Advanced Filter Introduction

Advanced Filter Criteria Slicers

Advanced Filter Macros

About Debra

 

Last updated: August 17, 2022 7:24 PM