LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 80
Default Macro to Insert a row and copy Formulae

All.

I want to write a macro to insert a row at the cell pointer.
Check that the first cell is in column A
and then copy a row of formulae into the new blank row.

I have hacked together the following. It quite happily inserts the row and
moves to column A but it only copies the formula row onto itself.
I think that I need to record the active cell (Column A of the inserted row)
and then paste the Formula row into it, but I've no idea where to start.

No need to give me the code, just point me in the right direction and I'll
try to work out the rest myself. This is a learning opportunity

Sub InsertRowAndPasteFormulae()
'
' Macro to Insert Row and Copy Formulae
' Macro prepared on 02/02/2006 by Philip.Smith
'
Selection.End(xlToLeft).Select
Selection.EntireRow.Insert
ActiveCell.Activate
Range("PP_Acc_Formulae").Copy
Range("PP_Acc_Formulae").PasteSpecial xlPasteFormulas


End Sub

Kind regards

Phil Smith
 
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 Insert Macro Schwimms Excel Discussion (Misc queries) 15 February 2nd 08 12:02 PM
Macro - Insert/Copy John Britto Excel Discussion (Misc queries) 0 November 15th 07 10:01 AM
Macro to Insert and copy entire row CCrew2000 Excel Discussion (Misc queries) 3 June 26th 07 03:16 PM
macro to insert pair of formulae in x number of rows -URGENT!!! marika1981 Excel Programming 5 June 22nd 05 04:41 PM
copy insert macro snax500[_2_] Excel Programming 1 January 14th 05 09:17 PM


All times are GMT +1. The time now is 09:20 AM.

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"