go to next cell and paste question

S

sunroyal

I am writing a macro that is supposed to take certain cells from a
"interface" page, remove them, and paste to a string of cells o
another. That is easy, but I cant figure out how to make them go t
another set of cells, if the ones I recorded are filled.

Example:

Sub Macro1()
'
' Macro1 Macro
' Macro recorded 8/4/2004 by Lane Lacy
'

'
ActiveWindow.LargeScroll ToRight:=17
ActiveWindow.ScrollColumn = 239
ActiveWindow.SmallScroll ToRight:=10
Range("IV2:IV7").Select
Selection.Copy
Application.CutCopyMode = False
Selection.Cut
Sheets("productivity").Select
Range("B3").Select
ActiveSheet.Paste
End Sub


If this runs over and over, can it paste to the next range"c3', the
"d3","f3" and so on...? Thanks, Sunn
 
J

jeff

Hi,

I modified your code to do such. Try this.

jeff
------------------
Sub Macro1()
'
' Macro1 Macro
' Macro recorded 8/4/2004 by Lane Lacy
'

'
ActiveWindow.LargeScroll ToRight:=17
ActiveWindow.ScrollColumn = 239
ActiveWindow.SmallScroll ToRight:=10
Range("IV2:IV7").Select
Selection.Copy
Application.CutCopyMode = False
Selection.Cut
Sheets("productivity").Select
lastcol = ActiveSheet.Cells("3", Columns.Count).End
(xlToLeft).Column
Range(Cells(3, lastcol + 1), Cells(3, lastcol + 1)).Select
ActiveSheet.Paste
End Sub
 
S

sunroyal

I am writing a macro that is supposed to take certain cells from a
"interface" page, remove them, and paste to a string of cells o
another. That is easy, but I cant figure out how to make them go t
another set of cells, if the ones I recorded are filled. I have trie
this, but no luck. Anyone?

Range("I23:I34").Select
Selection.Copy
Application.CutCopyMode = False
Selection.Cut
Sheets("productivity").Select
lastcol = ActiveSheet.Cells("3", Columns.Count).End
(xlToLeft).Column
Range(Cells(3, lastcol + 1), Cells(3, lastcol + 1)).Select
ActiveSheet.Paste
End Sub

Thanks, Lan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top