
- MS Excel Basics
- Excel - Home
- Excel - Getting Started
- Excel - Explore Window
- Excel - Backstage
- Excel - Entering Values
- Excel - Move Around
- Excel - Save Workbook
- Excel - Create Worksheet
- Excel - Copy Worksheet
- Excel - Hiding Worksheet
- Excel - Delete Worksheet
- Excel - Close Workbook
- Excel - Open Workbook
- Excel - Context Help
- Editing Worksheet
- Excel - Insert Data
- Excel - Select Data
- Excel - Delete Data
- Excel - Move Data
- Excel - Rows & Columns
- Excel - Copy & Paste
- Excel - Find & Replace
- Excel - Spell Check
- Excel - Zoom In-Out
- Excel - Special Symbols
- Excel - Insert Comments
- Excel - Add Text Box
- Excel - Undo Changes
- Formatting Cells
- Excel - Setting Cell Type
- Excel - Setting Fonts
- Excel - Text Decoration
- Excel - Rotate Cells
- Excel - Setting Colors
- Excel - Text Alignments
- Excel - Merge & Wrap
- Excel - Borders and Shades
- Excel - Apply Formatting
- Formatting Worksheets
- Excel - Sheet Options
- Excel - Adjust Margins
- Excel - Page Orientation
- Excel - Header and Footer
- Excel - Insert Page Breaks
- Excel - Set Background
- Excel - Freeze Panes
- Excel - Conditional Format
- Working with Formula
- Excel - Creating Formulas
- Excel - Copying Formulas
- Excel - Formula Reference
- Excel - Using Functions
- Excel - Builtin Functions
- Advanced Operations
- Excel - Data Filtering
- Excel - Data Sorting
- Excel - Using Ranges
- Excel - Data Validation
- Excel - Using Styles
- Excel - Using Themes
- Excel - Using Templates
- Excel - Using Macros
- Excel - Adding Graphics
- Excel - Cross Referencing
- Excel - Printing Worksheets
- Excel - Email Workbooks
- Excel- Translate Worksheet
- Excel - Workbook Security
- Excel - Data Tables
- Excel - Pivot Tables
- Excel - Simple Charts
- Excel - Pivot Charts
- Excel - Keyboard Shortcuts
- MS Excel Resources
- Excel - Quick Guide
- Excel - Useful Resources
- Excel - Discussion
How to AutoFilter Rows Based on Cell Values in Excel?
Generally, in Excel, we can always apply a filter to a list just by using a slicer, and we can click on the cell value you want to filter internally. But if you want to apply the filter based on a cell that is not inside the table, we cannot do it with the help of Slicer. We can complete this process with the help of the VBA application. We can apply the filter using an external value.
This tutorial will help you understand how you can auto-filter rows based on a cell value in Excel.
Step 1
Here we will insert the VBA code for the sheet, then click Enter. Let us see a straightforward process to know how we can auto-filter rows based on a cell value in Excel. We will be using the help of the VBA application to complete our process. We will be filtering the data based on where the results fail.

To begin, right-click on the sheet name and select View Code to open the VBA application, or use the command Alt+11 to open the VBA application and type the programme in the text box as shown in the image below.
Program
Private Sub Worksheet_Change(ByVal Target As Range) 'Updated By Nirmal If Target.Address = Range("E2").Address Then Range("A1:C16").CurrentRegion.AdvancedFilter Action:=xlFilterInPlace, CriteriaRange:=Range("E1:E2") End If End Sub
In the program, A1:A16 is the range on which you want to apply the filter, and E1:E2 is the range of cells you want to apply the filter based on.

Step 2
Now save the sheet as macro enabled and close the vba application using the command "Alt + Q", and when you click on Enter from the cell "E1", then the data will be filtered automatically as shown in the below image.

Conclusion
In this tutorial, we used a simple example to demonstrate how you can autofilter rows based on a cell values in Excel.
- Related Articles
- How to Auto-Insert Rows Based on Cell Values in Excel?
- How to border cells based on cell values in Excel?
- How to Auto-Number a Column Based on the Cell Values on Another Column in Excel?
- How to change value based on cell color in Excel?
- How to Auto-Strikethrough Based on Cell Value in Excel?
- How to Automatically Send Email Based on Cell Value in Excel?
- How to Copy a Column Based on Cell Value to Another Excel Sheet?
- How to get the cell value based on row and column numbers in Excel?
- How to Convert One Cell to Multiple Cells/Rows in Excel?
- How to Auto Change the Shape and Size Based on a Specified Cell Value in Excel?
- How to change values in a cell range in Excel?
- How to quickly jump to the adjacent cell based on the selection in an Excel dropdown list?
- How to delete rows above active cell or specific text in Excel
- Select rows from a Pandas DataFrame based on column values
- Python - Filter Rows Based on Column Values with query function in Pandas?
