Mr_Ragweed
Board Regular
- Joined
- Dec 10, 2012
- Messages
- 74
Hello and thanks in advance,
I am trying to select 2 noncontiguous columns. My code that doesn't work is below:
CODE STARTS HERE:
Activesheet.Range("A4:A" & FinalRow, "D4:D" & FinalRow).Select
Selection.Copy
END OF CODE.
What happens is that columns B and C get selected also.
I tried the following:
CODE STARTS HERE:
Range("A4,D4").EntireColumn.Select
Selection.Copy
END OF CODE
It actually selects the 2 columns i want but, as i told it to, selects the entire column instead of starting at A4 and D4 respectively.
I need some sort of FinalRow type statement because no 2 worksheets will be the same length and the number of sheets will also vary. However, the length of A and D will always be the same on the same sheet. (If any of that even matters.)
I also should point out that Column A is part of a Pivot Table and Column D is not (in case that matters as well.)
Thanks again!
I am trying to select 2 noncontiguous columns. My code that doesn't work is below:
CODE STARTS HERE:
Activesheet.Range("A4:A" & FinalRow, "D4:D" & FinalRow).Select
Selection.Copy
END OF CODE.
What happens is that columns B and C get selected also.
I tried the following:
CODE STARTS HERE:
Range("A4,D4").EntireColumn.Select
Selection.Copy
END OF CODE
It actually selects the 2 columns i want but, as i told it to, selects the entire column instead of starting at A4 and D4 respectively.
I need some sort of FinalRow type statement because no 2 worksheets will be the same length and the number of sheets will also vary. However, the length of A and D will always be the same on the same sheet. (If any of that even matters.)
I also should point out that Column A is part of a Pivot Table and Column D is not (in case that matters as well.)
Thanks again!