Search : in
By :

Excel -Copy Macro Problem

Last answer on Dec 5, 2008 5:27:53 pm GMT Monkey, on Sep 3, 2008 9:41:30 am BST 
 Report this message to moderators

Hello,

I have developed a macro (attached to a button) that copies data from one row (cells D8, E8, F8 & G8) to a sheet called transmittals. Every time the button is clicked it will then copy the data to the next available line on the transmittals sheet. Basically I want to copy the button down the source sheet many times, and I would like it to change the cell references automatically, so I dont have to. Please can you help me?

Here is my code:

Sub Copy()
mycount = Range("A12") + 1
Range("A12") = mycount
Range("D8,E8,F8,G8").Select
Range("G8").Activate
Selection.Copy
Sheets("Transmittals").Select
Range("A4").Offset(mycount, 0).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False

End Sub

Configuration: Windows XP
Internet Explorer 6.0

Best answers for « Excel Copy Macro Problem » in :
[Excel] – Running Macro Automatically Show[Excel] – Running Macro Automatically Issue Solution Issue I have a macro in excel which needs to be run twice a day and I don’t even want to open the excel sheet. How can I make this process automatic? If I can convert the macro...
Excel tips : How to insert date in a cell ShowExcel tips : How to insert date in a cell Below are some tips on how to insert date and time in an excel cell for a specific purpose:- To insert current date, press CTRL ¯+ ;¯ in the chosen cell. To insert current time, press CTRL¯+...
[Excel]changing cell formula to text Show[Excel]changing cell formula to text Issue Solution Notes Issue Consider that I have: In cell A4, it contains a formula =Sum(A1:B3)+A3/B2. How to extract this formula in cell A6 as a string of text? That is ... I want cell A6...

1

lexmarkd, on Sep 3, 2008 12:21:41 pm BST
  • +2

Cant you find any hint in the help file of excel itself?

Reply to lexmarkd

2

 Dragonruler12, on Dec 5, 2008 5:27:53 pm GMT
  • +1

Cant you use the Selection.Offset(Row,Column) which I believe is what you are asking. Move the active cell around by doing that.

Reply to Dragonruler12