Macro to fill down formulas when new data is entered

AshaG

New Member
Joined
Jan 13, 2019
Messages
5
I've been playing around with trying to get my sheet to fill down three formulas to the last row every time a new entry is added in Column A. And I want to do it without having to manually run the macro.

This is the code I've been playing with

Code:
Private Sub Worksheet_Activate()

Dim LastRow As Long
Di rngFormN As Range

Appliction.ScreenUpdating = False

With Worksheets ("Upgrade Requests")
LastRow = .Range("A" & Rows.Count).End(xlUp).Row

Set rngFormN =.Range("N3:N" & .Cells(.Rows.Count, "A").End(xlUp).Row)
rngFormN.Formula = "=IF(OR(E3 = "", I3 = "", "", NETWORKDAYS(E3,K3))"
rngFormN.Offset(0,1).Formula = "=IF(OR(E3 = "", I3 = "", "", NETWORKDAYS(E3,K3))"
rngFormN.Offset(0,2).Formula = "=IF(OR(E3 = "", I3 = "", "", NETWORKDAYS(E3,K3))"

End With

Application.ScreenUpdating = True

End Sub

I have tried versions of it in the section change event too, but I can't seem to get it to work. It just makes my whole workbook freeze. Any ideas would be a huge help
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Oh, yes I know I spelt Application wrong in the first Application.ScreenUpdating. I was having trouble with the post form freezing while I was typing.
 
Upvote 0

Forum statistics

Threads
1,214,649
Messages
6,120,733
Members
448,987
Latest member
marion_davis

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