I'm writing this VBA code that loops through a defined range and finds the filled cells within in, then it refers 5 different indexes to each cell, and to check if each cell is truly indexed with these values, I write my array to a worksheet.
I can manage the loop to work and print exactly the number of filled cells - but the problem is that it prints out the same exact value for each cell even though they are totally different.
Here is how my worksheet looks like:
\1
And what it prints out is:
\1
Using this code:
As you can see, even though the code loops through the entire range - only the last cell, Cells(6,8) is printed with its indexes.
NOTE: I can only do it using a 2D array of number of molecules x 5 indexes (uni project) so please do not try to change it, I just need to understand the problem of why I am only printing out one value for all cells.
I'd appreciate any help.
Bookmarks