Autofill down 1 row

ExcelPie

New Member
Joined
Oct 26, 2019
Messages
5
Hey guys,

I need some help with autofilling formulas in 5 columns, for example, in range B112:H112, down just one row.

To give some context, I have a forecast formula in each of the 5 cells in that row, and with the press of a button, it will generate another row of forecast.

So far, this is what I have recorded:


Sub AddForecast()
'
' AddForecast Macro
'


'
Range("B80").Select
Selection.End(xlDown).Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.AutoFill Destination:=Range("B112:H113"), Type:=xlFillDefault


End Sub




Due to my lack of VBA knowledge, I can only manage with recording macros.

I need the macro to reference the last row of the table, which I recorded with the selections, then autofill down 1 row.

But since it was recorded by dragging the bottom right corner down, it keeps defining a set range. I don't know how to define the range.

Big thanks to anyone who can help me out with this in advance!
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Hi & welcome to MrExcel.
How about
Code:
Sub ExcelPie()
    Range("B" & Rows.Count).End(xlUp).Resize(2, 7).FillDown
End Sub
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,214,641
Messages
6,120,684
Members
448,977
Latest member
dbonilla0331

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