Excel Macro Question

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

kandrelly

Thread Starter
Joined
Dec 29, 2010
Messages
3
I used the simple start and stop feature for a copy and paste macro so I can repeat it over and over.
The problem is that it keeps copying at the same cell instead of the current cell I am in.
I want to click where I need to be, the just do a control-letter command to do the task.
I am a real begginer here. Thanks.
 
Joined
Jul 14, 2010
Messages
154
-- Macro just repeats the same steps that performed while recording it. So no surprise that it did the way you said. wherever and whatever cell you click on and execute the macro, it just repeats the same steps( I mean, it copies the contents to the cell when it was recorded).

-- Just need an Code modification..
 

kandrelly

Thread Starter
Joined
Dec 29, 2010
Messages
3
Can you tell me what the code modification is?
Instead of the copying of the same cell, I want it to copy from the cell I am currently in.
Thanks.
 

kandrelly

Thread Starter
Joined
Dec 29, 2010
Messages
3
Please change to allow me to just have the macro start in the cell I am in, instead of A1. Thank you!!!

Sub COPYPASTE()
'
' COPYPASTE Macro
'
' Keyboard Shortcut: Ctrl+p
'
ActiveCell.Range("A1:A3").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
ActiveCell.Offset(5, 0).Range("A1").Select
End Sub

Thanks again!
 
Joined
Sep 4, 2003
Messages
4,912
Now explain exactly what this macro is supposed to be doing. Here is how to select the activecell and the two cells below it.

Range(Cells(ActiveCell.Row, ActiveCell.Column).Address & ":" & Cells(ActiveCell.Row + 2, ActiveCell.Column).Address).Copy

Rollin
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Members online

Top