Skip to content
- Excel VBA AutoFilter: Show All DataTo show every row hidden by an Excel AutoFilter, use VBA’s ShowAllData method, but first check that the worksheet is actually filtered:…VBA & macros
- Excel VBA AutoFilter Off: Clear Filters or Remove ArrowsTo turn off a standard worksheet AutoFilter in Excel VBA, first clear any active filter so the filtered-out rows reappear, then set…VBA & macros
- Excel VBA AutoFilter Not Blank: Code and FixesTo show rows where a column is not blank, apply AutoFilter to the full table or data range and use the criterion…VBA & macros
- Excel VBA AutoFilter: Exclude Multiple ValuesExcel VBA AutoFilter cannot use an array of “not equal to” criteria as a general exclusion list. An array passed with Operator:=xlFilterValues…VBA & macros
- Excel VBA AutoFilter Multiple Fields: Examples and TipsTo filter multiple Excel fields with VBA, call AutoFilter on the same range once for each column, using that column’s Field number…VBA & macros
- Excel VBA AutoFilter Multiple Criteria: A Practical GuideTo filter a range with Excel VBA using multiple allowed values in one column, pass an array to Criteria1 and set Operator:=xlFilterValues.…VBA & macros
- Excel VBA AutoFilter Multiple Columns: Examples and TipsTo filter several Excel columns with VBA, call AutoFilter once for each field, using the same data range. Each call adds or…VBA & macros
- Excel VBA AutoFilter Last Row: Find the Right RangeTo include every record in an Excel VBA AutoFilter, find the last data row and build the filter range from the header…VBA & macros
- Excel VBA AutoFilter Exclude Criteria ExplainedTo exclude one exact value with Excel VBA AutoFilter, set the field’s criterion to a not-equal condition: Criteria1:="<>Closed". For example, dataRange.AutoFilter Field:=3,…VBA & macros
- Excel VBA AutoFilter Header: Set, Find, and Fix Header RowsIn Excel VBA, the AutoFilter header is the first row of the range you pass to AutoFilter; include that row in the…VBA & macros
- Excel VBA AutoFilter: Exclude Values, Blanks, and TextTo exclude a value with Excel VBA AutoFilter, pass a not-equal criterion such as "<>Closed" to the field you want to filter:…VBA & macros
- Excel VBA AutoFilter: Does Not Contain CriteriaTo filter out rows where a column contains specific text, use Excel VBA AutoFilter with the criterion "<>*text*"; for example, Criteria1:="<>*draft*" shows…VBA & macros
- Excel VBA AutoFilter Example: Code and TipsTo filter a worksheet with VBA, use the AutoFilter method on a range that includes its header row. For example, if column…VBA & macros
- Excel VBA AutoFilter Wildcards: Criteria ExplainedYes. In Excel VBA, use * to match any number of characters, ? to match one character, and ~ to treat a…VBA & macros
- Excel VBA AutoFilter Criteria: Syntax and ExamplesIn Excel VBA, set AutoFilter criteria with the Range.AutoFilter method: specify a filter range that includes its header, a Field number relative…VBA & macros
- Excel VBA AutoFilter: Filter Cells That Contain TextYes. In Excel VBA, use AutoFilter with asterisks around the text in the criterion: Criteria1:="*invoice*" returns rows whose filtered column contains “invoice”…VBA & macros
- Excel VBA AutoFilter with an Array: A Practical GuideYes. In Excel VBA, pass a one-dimensional array of the values you want to keep to the range’s AutoFilter method, using Operator:=xlFilterValues.…VBA & macros
- Excel VBA AutoFilter Based on a Cell Value: ExamplesYes. In VBA, pass the value of a worksheet cell to the Criteria1 argument of Range.AutoFilter, for example: filterRange.AutoFilter Field:=2, Criteria1:=criteriaCell.Value. Set…VBA & macros
- Excel VBA AutoFilter Array: Filter Multiple ValuesTo filter a column for several exact values with Excel VBA, pass an array to Criteria1 and set Operator:=xlFilterValues. For example, dataRange.AutoFilter…VBA & macros
- Excel VBA ArrayList: How to Use It and When to Choose ItAn Excel VBA ArrayList is a resizable, zero-based list that can hold items and provides methods such as Add, Remove, Sort, and…VBA & macros
- Excel VBA Array Trim: Remove Blank ItemsIf you mean trimming an array in Excel VBA, VBA has no built-in function that removes blank elements from an array. The…VBA & macros
- Excel VBA Array to Sheet: Write Data with Range.ValueTo write a VBA array to an Excel worksheet, assign a two-dimensional array to a range of the same size with the…VBA & macros
- Excel VBA Array to Collection: Methods and ExamplesTo convert a VBA array to a Collection, create a Collection and add each array element in a loop. For example, assign…VBA & macros
- Excel VBA Array Syntax: Declarations, Bounds, and ExamplesIn Excel VBA, declare an array with parentheses after its name, such as Dim scores(1 To 5) As Long; use Dim scores()…VBA & macros
- Excel VBA Array of Worksheets: Create and Use OneIn Excel VBA, you can work with several worksheets as a group by passing an array of sheet names to Worksheets, or…VBA & macros
- Excel VBA Array Indexing: Bounds, Loops, and ExamplesAn Excel VBA array index is the number used to identify an element in an array. In VBA, an array declared without…VBA & macros
- Excel VBA Array Formula: How to Enter and Manage ItIn Excel VBA, use Range.FormulaArray to enter a traditional, Ctrl+Shift+Enter array formula, or use Range.Formula2 to enter a modern dynamic-array formula that…VBA & macros
- Excel VBA Array Example: Create, Fill, and Write DataA simple Excel VBA array example is to store values in a two-dimensional array, then write the array to a worksheet range…VBA & macros
- Excel VBA Array Empty? How to Check If It Is AllocatedIn Excel VBA, IsEmpty does not reliably tell you whether an array has been allocated. For a dynamic array, test whether it…VBA & macros
- Excel VBA Array Duplicate Values: Find, Keep, or RemoveYes. To find duplicate values in an Excel VBA array, scan its elements and track values already seen; to remove duplicates while…VBA & macros