Hello all.
I am having a problem with my code.
Here is what i am trying to do.
Lets say i have data in rows R1C1, R3C1 AND R5C1. I have hidden rows 2,4. Now I want to copy the info from R1C1 to R3C2. My problem happens with the hidden rows. It will copy with the offset of (0, -1) from the selected cell of R3C2, but will paste it in R2C2 when I use the offset of (1, 0).
I have looked all over the internet and know I am missing one little thing but can't seem to pinpoint the problem.
I have add my simple code to this post please let me know where I have gone wrong!
Thanks
I am having a problem with my code.
Here is what i am trying to do.
Lets say i have data in rows R1C1, R3C1 AND R5C1. I have hidden rows 2,4. Now I want to copy the info from R1C1 to R3C2. My problem happens with the hidden rows. It will copy with the offset of (0, -1) from the selected cell of R3C2, but will paste it in R2C2 when I use the offset of (1, 0).
I have looked all over the internet and know I am missing one little thing but can't seem to pinpoint the problem.
I have add my simple code to this post please let me know where I have gone wrong!
Thanks
Code:
Sub OFFSETCOPY()'
'
'SELECT AND COPY ONE C UP AND ONE R LEFT OF CURRENT SELECTION
ActiveCell.Offset(0, -1).Select
Selection.Copy
Do
ActiveCell.Offset(1, 0).Select
Loop While ActiveCell.EntireRow.Hidden = True
'SELECT AND PAST ONE C DOWN AND ONE R RIGHT OF CURRENT SELECTION
ActiveSheet.PASTE
End Sub