Excel Tutorial: How to use VBA to delete filtered rows (fast!!) ... but not delete hidden rows

Опубликовано: 04 Апрель 2026
на канале: Victor Chan
43,164
335

// FREE Excel E-book "Record Your First Macro"
→ https://www.launchexcel.com/record-yo...

// Recommended Excel Courses //

1. Launch Excel Macros & VBA School: https://go.launchexcel.com/macros-vba...
2. Excel Campus Elevate Program: https://go.launchexcel.com/excel-camp...
3. My Online Training Hub Dashboards: https://go.launchexcel.com/moth-dashb...
4. Coursera Excel Specialisation: https://go.launchexcel.com/coursera-e...
5. Coursera Everyday Excel: https://go.launchexcel.com/coursera-e...
6. Coursera Excel Data Visualisation: https://go.launchexcel.com/coursera-d...

// Recommended Excel Templates //

If you are looking for pre-built, easy to use spreadsheets, check out Simple Sheets.
https://go.launchexcel.com/simple-she...

They have Excel templates covering cash flow planning, invoices, expense reports, personal budgets, and more!


DOWNLOAD WORKBOOK → https://www.launchexcel.com/media/sam...

——
// EPISODE NOTES

In this tutorial video we look at how to delete (or remove) filtered rows in your Excel spreadsheets using the built-in programming language VBA (Visual Basic for Applications).

I walk through two sample VBA macros.

VBA Macro 1 - Applies two filter criteria to your worksheet autofilter, then deletes the VISIBLE filtered rows.

VBA Macro 2 - Applies two filter criteria to your worksheet autofilter, then deletes the HIDDEN rows.

Please follow these instructions to learn from the workbook download:

▸ Download the sample Excel workbook: https://www.launchexcel.com/media/sam...

▸ Open the workbook and make sure to enable macros

▸ Press ALT + F11 to open the VBA Editor

▸ Use F8 to step through the code one line at a time

▸ I suggest you adapt this to your own needs... just copy and paste the code, then change the code to work for you

▸ If you have a viewer request, leave me a comment below and I'll try to solve your problem and create a new video

——
// REFERENCES

Excel Version: 2016 (used in video)

——
// VISIT MY WEBSITE

For more tutorials on Microsoft Excel and VBA visit the website
→ www.launchexcel.com