I have a 2D array that stores data from a table after running through the calculations.
I have managed to get the data tabulated and am currently trying to paste the data onto a second excel sheet.
I have managed to apply a brute force method however this isn't practical when the sheet has to get updated with more data, I have been using the UBound code to paste the data, but when I do I keep getting an extra column & row 0's before the data is pasted. I am not sure where the data is coming from.
Initial declaration as follows:
Dim Project_Data() As Integer
Set Output = Sheet2
Then below it's updated for data calculation:
ReDim Project_Data(6, Week_Count)
Code to Paste onto excel sheet:
Dim Destination As Range
Set Destination = Output.Range("B20").Resize(UBound(Project_Data, 1) + 1, UBound(Project_Data, 2))
Destination.Value = Project_Data
Output: (the #'s in red shouldn't be there)
I have managed to get the data tabulated and am currently trying to paste the data onto a second excel sheet.
I have managed to apply a brute force method however this isn't practical when the sheet has to get updated with more data, I have been using the UBound code to paste the data, but when I do I keep getting an extra column & row 0's before the data is pasted. I am not sure where the data is coming from.
Initial declaration as follows:
Dim Project_Data() As Integer
Set Output = Sheet2
Then below it's updated for data calculation:
ReDim Project_Data(6, Week_Count)
Code to Paste onto excel sheet:
Dim Destination As Range
Set Destination = Output.Range("B20").Resize(UBound(Project_Data, 1) + 1, UBound(Project_Data, 2))
Destination.Value = Project_Data
Output: (the #'s in red shouldn't be there)
0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
0 | 5 | 6 | 6 | 8 | 9 | 9 | 10 | 10 | 14 | 12 |
0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
0 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 2 |
0 | 0 | 0 | 0 | 0 | 0 | 1 | 2 | 3 | 3 | 3 |
0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 |
0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 1 |