Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default inserting rows with formulas

Hi

Does anyone know how to code a button on the worksheet to
insert 2 rows above the active cell and then copy the
formulas down (or up) from the rows that are adjacent?

Many thanks
Ken
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 102
Default inserting rows with formulas

This should work, adjust ColumnToFill as needed.

Dim R As Integer, ColumnToFill As Integer
R = ActiveCell.Row
ColumnToFill = 1
ActiveCell.EntireRow.Insert
Range(Cells(R - 1, ColumnToFill), Cells(R, ColumnToFill)).FillDown

--
Regards,
Rocky McKinley


"~Ken~" wrote in message
...
Hi

Does anyone know how to code a button on the worksheet to
insert 2 rows above the active cell and then copy the
formulas down (or up) from the rows that are adjacent?

Many thanks
Ken



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
copying formulas when inserting new rows Steve M[_4_] Excel Discussion (Misc queries) 7 September 8th 08 02:55 PM
Copy Formulas when inserting rows kevhatch Excel Discussion (Misc queries) 1 February 27th 07 01:33 PM
Inserting formulas etc after n rows Peter Excel Discussion (Misc queries) 1 September 22nd 05 02:20 PM
Inserting Rows w/formulas question Buckwheat Excel Worksheet Functions 4 May 7th 05 10:05 PM
Inserting Multiple Rows with Formulas ShineboxNJ Excel Worksheet Functions 2 November 18th 04 02:30 AM


All times are GMT +1. The time now is 09:56 PM.

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"