I want to get values from other sheets.
I have some values in Excel (sheet2) for example:
A B C D
- - - -
1 | 2 5 9 12
2 | 5 8 4 5
3 | 3 1 2 6
I sum each column in row 4.
I'm working with these values in sheet2 but I want to get the result in sheet1.
When using my code in sheet2 I get the correct answer but when I try to use it in a different sheet I get the result of the values corresponding to the current sheet cells and not to sheet2.
I'm using With Application.WorksheetFunction
.
How can I set sheet2 as the active sheet?
See Question&Answers more detail:os