Delete rows based on Cell Value using arrays in VBA

Опубликовано: 15 Март 2025
на канале: EverydayVBA
6,585
46

Grab the Free VBA Quick Reference Guide
https://www.chrisjterrell.com/excel-v...
Delete Rows using an array
As in most coding languages, there are many ways to do something. In this video, we delete rows using an array. There are other methods to remove rows that are more efficient but you won't learn as much code!

In this video you will learn how to:

Transfer a range of data to an array using Current Region
Use an inputbox to that will be used as a criteria to remove rows
Use a For Loop to loop through the array
Use an If Statement combined with another For Loop to blank out the rows
You will then transfer the array back to the original range
And then we will sort the range to move all the zeroed out rows to the bottom
And to finish is off we will add some error handling
Below is the finalized code

Get the Code and Download the file here
https://chrisjterrell.com/blog/198241...