kyriakos kyriakou
New Member
- Joined
- Mar 28, 2020
- Messages
- 7
- Office Version
- 365
- Platform
- Windows
Hello all,
I want to make a macro that goes to another tab find all the cells that have context in it in column A, copy them (without copying the row 1 as i have the titles there) and paste them to a different tab.
Here is my code.
Sheets("Source_previous month").Select
Application.Goto Reference:="R9999C1"
Selection.End(xlUp).Select
Range(Selection, Selection.End(xlUp)).Select
ActiveCell.Offset(1, 0).Range("A1").Select
Selection.Copy
Sheets("Pivot").Select
Range("A2").Select
ActiveSheet.Paste
My problem is that, when i offset, it looses the selection, so with this code, it just copy one cell.
Thanks in advance
I want to make a macro that goes to another tab find all the cells that have context in it in column A, copy them (without copying the row 1 as i have the titles there) and paste them to a different tab.
Here is my code.
Sheets("Source_previous month").Select
Application.Goto Reference:="R9999C1"
Selection.End(xlUp).Select
Range(Selection, Selection.End(xlUp)).Select
ActiveCell.Offset(1, 0).Range("A1").Select
Selection.Copy
Sheets("Pivot").Select
Range("A2").Select
ActiveSheet.Paste
My problem is that, when i offset, it looses the selection, so with this code, it just copy one cell.
Thanks in advance