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: 1
Default Copying formulas in a Macro

I've written a macro that enters formulas in cells W2 to Z2. I want to fill
these columns with the formulas from the last populated row which is end.down
in column G.

I've recorded the macro below but this always refers to specific cells
rather than cells in Cols W and X relative to the last populated cell in Col
G e.g end.down in Col G, then select RC[16]:RC[17], shift end up edit fill

Any ideas would be much appreciated.

Thanks


Application.CutCopyMode = False
Range("W2").Select
ActiveCell.FormulaR1C1 = "=IF(TYPE(RC7)=2,0,ROUND(RC13*25%,2))"
Range("X2").Select
ActiveCell.FormulaR1C1 = "=IF(TYPE(RC7)=2,0,ROUND(RC19*25%,2))"
Range("G1").Select
Selection.End(xlDown).Select
Range("W4644:X4644").Select
Range(Selection, Selection.End(xlUp)).Select
Selection.FillDown
End Sub
 
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
copying formulas ambam Excel Worksheet Functions 7 January 13th 10 09:03 PM
Copying Sum Formulas Justin Hoffmann Excel Worksheet Functions 3 May 11th 06 09:26 PM
Copying Formulas kellbro Excel Discussion (Misc queries) 2 May 10th 06 11:13 PM
copying formulas Tracey Excel Discussion (Misc queries) 7 December 22nd 04 03:51 PM
Copying macro formulas down Kevin Excel Programming 2 August 29th 03 04:21 PM


All times are GMT +1. The time now is 08:35 AM.

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

About Us

"It's about Microsoft Excel"