Macro to pull down formula from cells above new data?

tonywatsonhelp

Well-known Member
Joined
Feb 24, 2014
Messages
3,197
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
Hi everyone,
thought this would be easy but struggling with it,

all I need is a macro that when run goes to the last cell with data in it in column f and pulls the formula down to fill the rows that have data in them, you can use column B for the row to stop.

basically I have a macro that adds new data to columns b to g and f is a simple formula, so I just need a macro to pull the formula down each time I add new data.

please help if you can

Tony
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
You might try this:

Please test on a copy.

Code:
Sub test()

LastBRow = Range("B" & Rows.Count).End(xlUp).Row
LastFRow = Range("F" & Rows.Count).End(xlUp).Row
Range("F" & LastFRow).Copy
Range("F" & LastFRow + 1 & ":F" & LastBRow).PasteSpecial (xlPasteFormulasAndNumberFormats)

End Sub
 
Upvote 0

Forum statistics

Threads
1,215,608
Messages
6,125,820
Members
449,265
Latest member
TomasTeix

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