Need to insert rows with formulas

sachi1982

New Member
Joined
May 14, 2015
Messages
30
Office Version
  1. 365
Platform
  1. Windows
Hi All,

In my work sheet i need to add 100 rows with formulas.

for eg. i want to insert 100 rows from row 300 and i want to those 100 rows to inherit row 299 formulas. this template got columns from A to Q and need to copy down all these formulas.

Could you kindly help. I have very limited knowledge in macros. so appreciate if you can give me the whole code.

cheers,
S
 
You should have mentioned all of this in your first post so people don't waste time on code that is not what is required.
Read your last post again and see if there is anything in it that should be explained. Hint" "I got one column that got manual input"

I don't really think this is Sachi's fault, we naturally assumed that each cell in the A:Q range held formulae.
I think from his comment:
this template got columns from A to Q and need to copy down all these formulas
that he assumed that we provide code for only those cells with formulae.
 
Upvote 0

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Code:
Sub From_Last_Used_Row_B()
Dim lr As Long, a As Long, b As String
lr = Cells(Rows.Count, 1).End(xlUp).Row

a = InputBox("How many extra rows do you want filled?", "Rows to fill with formulae")
b = InputBox("Which Column is to be excluded?", "Enter a alphabetical Column letter")
b = Range(UCase(b) & 1).Column

With Range(Cells(lr, 1), Cells(lr, b - 1))
    .AutoFill Destination:=.Resize(a + 1), Type:=xlFillCopy
With Range(Cells(lr, b + 1), Cells(lr, 17))
    .AutoFill Destination:=.Resize(a + 1), Type:=xlFillCopy
End With
End With
End Sub
 
Upvote 0
Sorry guys... i did not realize that there are comments on page 2. i put some work instructions for the older codes that you guys gave me, so that people would not confuse. Thanks alot for the help
 
Last edited:
Upvote 0

Forum statistics

Threads
1,213,544
Messages
6,114,249
Members
448,556
Latest member
peterhess2002

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