15 YouTube views, likes subscribers in 10 minutes. Free!
Get Free YouTube Subscribers, Views and Likes

VBA Array with Filter Sort and Slice (2021)

Follow
Excel Macro Mastery

Ready to master VBA?
Check out my full courses: https://courses.excelmacromastery.com/
Subscribe to the channel here: https://bit.ly/36hpTCY
Want to download the source code for this video? Go here: https://bit.ly/3bCWkj8
(Note: If the download page doesn't work then make sure to turn off any popup blockers)

VBA Array with Filter, Sort and Slice (2021)

The Array is VBA is super fast which is why we use it. But it has limited functionality. In this video I'm going to show you a brand new Array class that allows you to easily sort, filter, search, reverse, retrieve rows and columns and more.

At the end of the video, you will see an amazing FilterBy Function that allows you to create custom filter functions just like you can do in most modern programming languages.

#VBAArray #VBAArrays #ExcelVBAArrays

Useful VBA Shortcut Keys
========================

Debugging:
Compile the code: Alt + D + C OR Alt + D + Enter
Run the code from the current sub: F5
Step into the code line by line: F8
Add a breakpoint to pause the code: F9(or click left margin)

Windows:
View the Immediate Window: Ctrl + G
View the Watch Window: Alt + V + H
View the Properties Window: F4
Switch between Excel and the VBA Editor: Alt + F11
View the Project Explorer Window: Ctrl + R

Writing Code:
Search keyword under cursor: Ctrl + F3
Search the word last searched for: F3
Auto complete word: Ctrl + Space
Get the definition of the item under the cursor: Shift + F2
Go to the last cursor position: Ctrl + Shift + F2
Get the current region on a worksheet: Ctrl + Shift + 8(or Ctrl + *)
To move lines of code to the right(Indent): Tab
To move lines of code to the left(Outdent): Shift + Tab
Delete a Line: Ctrl + Y(note: this clears the clipboard)

Table of Contents:

00:00 Introduction
00:11 Why use Arrays?
02:30 The problem with the standard VBA array
02:43 Adding the array class to your code
06:26 Inserting Rows
07:51 Removing rows
08:32 Searching the Array using IndexOf
10:35 Basic Filtering
11:35 Filter using custom functions
13:49 Create a compare function easily
14:59 IndexOf with a custom function

posted by den191q