Read Individual Columns to an Array

In Excel VBA as I have shown previously you can push data between 2 or more arrays.  There have been a glut of examples on this website where I have moved data from one array to another.  There have even been examples where I have moved only certain columns into a single array.  The following method with you the INDEX formula within VBA to move data from one array to another but only move the columns which are specified.  With the following method of the 6 column array (Cols A – F) only columns A, C and E will be moved from the first variant, to the second variant.

Read More

Filter Data in VBA without an Excel Filter

In Excel VBA it is possible to apply a filter directly to items contained within an array.  This method, little known, is a way of filtering without the more traditional auto filter.  I have not conducted any tests but as the filter is performed in memory I assume the process happens more quickly than a regular Excel auto filter.  This would make a nice Excel case study.

Read More

Excel VBA to Sort an Array

I was recently researching the sorting of an array.  I sat in my reading chair and read through John Walkenback’s excellent Power Programming tome on the subject and did some research online when I came across the brilliant .Net feature System Collections ArrayList.  What a find it was as this feature allows you to sort an array and send that array right back into Excel.

Read More