First, there is no "Worksheet_SelectionChange2" event. So that means if you
wanted this to run automatically, it won't work. And it would scare me to use
the "worksheet_selectionchange" event--it would fire way too often for me.
Just my opinion, but if I wanted something like this, I'd want to run it on
demand--not automatic.
If that appeals to you, you may want to look at the way David McRitchie handled
it:
http://www.mvps.org/dmcritchie/excel/insrtrow.htm
look for: InsertRowsAndFillFormulas
RompStar wrote:
>
> does this look like it would do the job of auto filling the formula to
> new rows if I stick it into the sheet code ?
>
> Private Sub Worksheet_SelectionChange2(ByVal Target As Range)
> Application.EnableEvents = False
> If Target.Offset(-1, 0).HasFormula = True Then
> Range(Target.Offset(-1, 0), Target).FillDown
> End If
> Application.EnableEvents = True
> End Sub
>
> I did it and turned off the extend data range formats and formulas in
> tools, options and edit...
>
> SO I am thinking the script isn't working like it should, how close is
> it ?
--
Dave Peterson