ashleyuk1984
04-26-2020, 01:15 PM
Hi,
I've got a 2D array, and I basically want to dump part of it onto a sheet.
Screenshot of Locals window below.
https://images2.imgbox.com/97/3d/GIaeFCLp_o.jpg (http://imgbox.com/GIaeFCLp)
Let's say I want to dump the contents of MonthTotals(1,0) to MonthTotals(1,7) onto the sheet at A1:H1
What code can do that for me?
I've tried this:
Sheets("Sheet2").Range("A1").Resize(1, UBound(OverallData, 2) + 1).Value = OverallData
Which dumps Monthtotals(0,0) to MonthTotals(0,7), but if I change it to this:
Sheets("Sheet2").Range("A1").Resize(2, UBound(OverallData, 2) + 1).Value = OverallData
But then I get both Monthtotals(0,0) to MonthTotals(0,7) AND Monthtotals(1,0) to MonthTotals(1,7) underneath it...
All I want is Monthtotals(1,0) to MonthTotals(1,7)
Is this possible?
Thanks
I've got a 2D array, and I basically want to dump part of it onto a sheet.
Screenshot of Locals window below.
https://images2.imgbox.com/97/3d/GIaeFCLp_o.jpg (http://imgbox.com/GIaeFCLp)
Let's say I want to dump the contents of MonthTotals(1,0) to MonthTotals(1,7) onto the sheet at A1:H1
What code can do that for me?
I've tried this:
Sheets("Sheet2").Range("A1").Resize(1, UBound(OverallData, 2) + 1).Value = OverallData
Which dumps Monthtotals(0,0) to MonthTotals(0,7), but if I change it to this:
Sheets("Sheet2").Range("A1").Resize(2, UBound(OverallData, 2) + 1).Value = OverallData
But then I get both Monthtotals(0,0) to MonthTotals(0,7) AND Monthtotals(1,0) to MonthTotals(1,7) underneath it...
All I want is Monthtotals(1,0) to MonthTotals(1,7)
Is this possible?
Thanks