VBA – Array to Excel Range. With filtered rows.

Excel with VBA is really a powerful tool. There should be some 5 more years, until Python really becomes a standard for the Excel people and I am not sure that it would actually happen that quickly.

Anyway, working with Ranges and Arrays in Excel and VBA saves time. In this article, I will show how to write a VBA Array to Excel range. Even when the rows are filtered.

Excel can fly with VBA!

When the rows are filtered, and we still have to write in the filtered rows, a simple loop from the array into the range actually works like a charm:

In the video below, using the code that is also below, the column G of the picture above is filled out (that is a sentence, definitely not generated by Chat GPT :)).

Anyway, here is the code:

And in order to make sure it works like a charm, use the functions below as well:

Enjoy!

Tagged with: , , , ,