Macro to insert row and copy down formulas

Cammandk

New Member
Joined
May 9, 2013
Messages
15
My worksheet has no visible row no for user presentation.
I want to place the cursor in first column (A) and at that row insert a new row from A to W and copy down all the formulas/formatting and conditional formats. Need to attack a ctrl key L to run it. This macro only to work in Cost manager sheet.
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Code:
Sub InsertCopyDn()
    If ActiveSheet.Name = "Cost Manager" _
            And Selection.Column = 1 _
            And Selection.Areas.Count = 1 Then
        Selection.Resize(1, 23).Select
        Selection.Insert , CopyOrigin:=xlFormatFromLeftOrAbove
        Selection.Offset(-1, 0).Copy Selection
    End If
    Application.MacroOptions Macro:="InsertCopyDn", ShortcutKey:="L"
End Sub
 
Upvote 0

Forum statistics

Threads
1,215,510
Messages
6,125,237
Members
449,217
Latest member
Trystel

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top