Active Offset Issue - Please help

Closed
Craig - Aug 11, 2009 at 08:08 AM
 Craig - Aug 11, 2009 at 11:12 AM
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
Related:

3 responses

Excelguru Posts 261 Registration date Saturday April 11, 2009 Status Member Last seen June 21, 2011 307
Aug 11, 2009 at 08:53 AM
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.
0
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.
0
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
0