View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
MacroMike MacroMike is offline
external usenet poster
 
Posts: 3
Default Macro should copy & paste to various cells, but won't.

Sub Macro1()
'
' Macro1 Macro
' Macro recorded 9/10/2007
'
' Keyboard Shortcut: Ctrl+a
'
Selection.Copy
ActiveCell.Offset(1, 0).Range("A1").Select
Range(Selection, Selection.End(xlDown)).Select
ActiveCell.Range("A1:A10").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Selection.End(xlDown).Select
ActiveCell.Offset(3, 0).Range("A1").Select
End Sub

"A1" is the first cell I used to create the macro, not cell "A1"
"A1:A10" copies 10 cells down each time I execute the macro. This needs to
change somehow to a variable quantity, as determined by the "end" and "down
arrow" keys.

Mike

"Jim Thomlinson" wrote:

Post your code...
--
HTH...

Jim Thomlinson


"MacroMike" wrote:

A simple macro to copy a cell to several other cells, will only paste a
specific number of copies. When setting up the macro, I copied one cell to
the next 10 cells below, using the "end" and "arrow down" buttons. Then I
"end arrow down" to the next cell to copy to start the process over, then
stopped recording.

But when the macro runs, it only pastes to exactly 10 cells below the
starting point. I might need 5 cells or 10 or more, but it picks exactly 10
based on my initial instructions.

How does the macro paste down a specific number of cells, using the "end"
and "down arrow" buttons?