Active Offset Issue - Please help

Closed
-
 Craig -
Hello,

I have been struggling with developing a macro to copy from a data entry cell then paste to the next empty cell in an adjacent column. Specifically, I enter data into cell "T8" and want to press a macro button to copy and paste the data into column "U" starting at "U8". Every time I press the macro I want to paste to the next empty cell in column "U". I continue to get an error. I have read the previous forum entries and seem to continue to miss something. Here is what I have so far that works, can anybody assist me in writing the correct offset. Thanks


Sub MACROS1()

Range("T8").Select
ActiveCell.Copy
Range("U8").Select
ActiveSheet.Paste
Application.CutCopyMode = False

End Sub

Craig

3 replies

Posts
261
Registration date
Saturday April 11, 2009
Status
Member
Last seen
June 21, 2011
307
Try this
Sub MACROS1()

Range("T8").Select
ActiveCell.Copy
Range("U8").Select
ActiveSheet.Paste
Application.CutCopyMode = False

'Change the sentence in italics to Range(ActiveCell.Offset(0, 1).Address).Select

End Sub
--
Winners are losers who got up and gave it one more try. -Dennis DeYoung
My Interests are in financial Modelling and custom excel development.
Thanks for the attempt. The code was inserted but I get the same results as my original script. Cannot figure out why the offset will not work. Any other suggestions are welcomed. Thanks again.
Just figured out how this can work. Thanks for any suggestions. If there is a better way please let me know.


Sub MACROS1()
'
' MACROS1 Macro
' Test to copy to next line
'

StartRow = 8
StartColum = "T"
TargetRow = 8
TargetColum = "U"



Start = StartColum + "" & StartRow
Target = TargetColum + "" & TargetRow

While Range(Target) <> ""
TargetRow = TargetRow + 1
Target = TargetColum + "" & TargetRow
Wend

Range(Target) = Range(Start)

Application.CutCopyMode = False

End Sub


Craig