Sub test()
Dim testarray(1, 2)
Dim fullarray(1)
fullarray(1) = Range("TestRange")
tester = Application.WorksheetFunction.Sum(fullarray(1))
tester2 = Application.WorksheetFunction.Sum(fullarray(1)(*, 2))
End Sub
"Test Range" is the following range
1 2
2 4
3 6
4 8
5 10
6 12
tester returns 64 (which is correct)
tester2 is the problem. I am trying to return the sum of all elements in the 2nd column (to arrive at 42)
is there any way to do this?
thanks
Dim testarray(1, 2)
Dim fullarray(1)
fullarray(1) = Range("TestRange")
tester = Application.WorksheetFunction.Sum(fullarray(1))
tester2 = Application.WorksheetFunction.Sum(fullarray(1)(*, 2))
End Sub
"Test Range" is the following range
1 2
2 4
3 6
4 8
5 10
6 12
tester returns 64 (which is correct)
tester2 is the problem. I am trying to return the sum of all elements in the 2nd column (to arrive at 42)
is there any way to do this?
thanks