Hello -
Thank you in advance for any help regarding this topic.
I have a 2-D array initialized in my code with variable row and column counts. Within that array there are rows which begin with an empty entry. I cannot modify the input, so I am forced to remove the rows which begin with an empty entry from the array.
My first attempt at a solution I created a second 2-D array with the same dimensions as the first 2-D array. I then used nested for-loops to traverse the first array and used an if statement to only add to the second array if the entry was non-empty. I thought this would work, but it still had the empty rows.
Any help on this would be greatly appreciated. I'm surprised I could not find a cookie cutter function online. This just seems like an exercise in traversing an array and removing entries, but I am struggling.Please Login or Register to view this content.
Thank you.
EDIT: To clarify a potential question, if a row in the array begins with an empty entry then the entire row will be empty.
EDIT2: By the way this is all being done with an Excel VBA sub with a 2-D variant array.
Bookmarks