Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Macro should copy & paste to various cells, but won't.

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?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,939
Default Macro should copy & paste to various cells, but won't.

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?

  #3   Report Post  
Posted to microsoft.public.excel.misc
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?

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,345
Default Macro should copy & paste to various cells, but won't.

Try removing the line:
ActiveCell.Range("A1:A10").Select

and see what your code does as it is.

I assume that you are filling in between the active cell and the next cell
down with the value in the active cell. If so then try:

Sub PasteIt()
GoDown = ActiveCell.End(xlDown).Row - 1
ActiveCell.Copy Destination:= _
Range(Cells(ActiveCell.Row, _
ActiveCell.Column), Cells(GoDown, _
ActiveCell.Column))

End Sub

Incidentally your code replaces the value in the next cell down from the
active cell.

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"MacroMike" wrote in message
...
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?




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

Having trouble implementing this code in with the other, but I'll keep
trying. Thanks all for the help.

"Sandy Mann" wrote:

Try removing the line:
ActiveCell.Range("A1:A10").Select

and see what your code does as it is.

I assume that you are filling in between the active cell and the next cell
down with the value in the active cell. If so then try:

Sub PasteIt()
GoDown = ActiveCell.End(xlDown).Row - 1
ActiveCell.Copy Destination:= _
Range(Cells(ActiveCell.Row, _
ActiveCell.Column), Cells(GoDown, _
ActiveCell.Column))

End Sub

Incidentally your code replaces the value in the next cell down from the
active cell.

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"MacroMike" wrote in message
...
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?







  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,345
Default Macro should copy & paste to various cells, but won't.

Hi Mike,

I didn't intend that youimplimented both codes together, I was saying that
the line: "ActiveCell.Range("A1:A10").Select" was the line that was causing
your code to paste 10 cells every time.

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"MacroMike" wrote in message
...
Having trouble implementing this code in with the other, but I'll keep
trying. Thanks all for the help.

"Sandy Mann" wrote:

Try removing the line:
ActiveCell.Range("A1:A10").Select

and see what your code does as it is.

I assume that you are filling in between the active cell and the next
cell
down with the value in the active cell. If so then try:

Sub PasteIt()
GoDown = ActiveCell.End(xlDown).Row - 1
ActiveCell.Copy Destination:= _
Range(Cells(ActiveCell.Row, _
ActiveCell.Column), Cells(GoDown, _
ActiveCell.Column))

End Sub

Incidentally your code replaces the value in the next cell down from the
active cell.

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"MacroMike" wrote in message
...
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?







Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
copy and paste using macro kate Excel Discussion (Misc queries) 3 May 22nd 07 07:41 PM
Macro - Copy and Paste repeatedly skipping cells [email protected] Excel Discussion (Misc queries) 5 January 6th 07 11:22 PM
HELP with macro for copy and paste RedOctagon Excel Discussion (Misc queries) 0 October 13th 06 02:54 PM
macro copy/paste data from multiple cells to multiple cells Diana Excel Discussion (Misc queries) 0 July 10th 06 09:24 PM
Copy/Paste how to avoid the copy of formula cells w/o calc values Dennis Excel Discussion (Misc queries) 10 March 2nd 06 10:47 PM


All times are GMT +1. The time now is 10:08 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"