OK guys, I am perplexed by this problem. With this code I basically take two matrixes (both 7 columns wide but different height) from the spreadsheet and try to stack them on top of eachother. I have dumbed down the problem a bit (considering my code is way longer). THe first loop takes all the values from the first array and places them in the top part pf the new array and the second loop sticks all the 2nd array values on the bottom of the new array.
My question comes when I try to make an array of just the last column. I used the Index worksheet function to take the last column (7) of the new matrix (Val) and assign it to the new array I am creating (PV). However, that doesn't seem to work. Instead it makes the new array the 2nd to last column (6) of Val. But when I try testing the Val matrix for the the 7th column it comes out fine. It appears to me that while the Val matrix is a CtAll by 7 matrix and the PV matrix is a CtAll by 8 matrix with the first column blank. Even though I dimmed the PV matrix as a CtAll by 7 matrix. So I can't understand why this happened and was hoping somebody could explain it to me or help me make it work the way I expect it to.
The most perplexing thing is that earlier in my code I did something very similar using the worksheet index function and it came out the way I expected it. Otherwise I would have jsut though that it had something to do with my base value (1 or 0) settings.
Thanks for taking the time to read this guys.Please Login or Register to view this content.
Bookmarks