excel-vba autofilter ; Uses and best practices

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Introduction

Autofilter ultimate goal is to provide in the quickest way possible data mining from hundreds or thousands of rows data in order to get the attention in the items we want to focus on. It can receive parameters such as "text/values/colors" and they can be stacked among columns. You may connect up to 2 criteria per column based in logical connectors and sets of rules. Remark: Autofilter works by filtering rows, there is no Autofilter to filter columns (at least not natively).

Remarks

'To use Autofilter within VBA we need to call with at least the following parameters:

Sheet("MySheet").Range("MyRange").Autofilter Field=(ColumnNumberWithin"MyRange"ToBeFilteredInNumericValue) Criteria1:= "WhatIWantToFilter"

'There are plenty of examples either on the web or here at stackoverflow



Got any excel-vba Question?