A
Arnold
Hi All,
I obtained code from a thread "Automatically fill down formulas when
adding a record" and modified it because I had more formulas in more
columns to carry down to new records. It works but it also interferes
with other Worksheet_Change events.
If Target.Cells.Count > 1 Then Exit Sub
If Intersect(Target, Me.Range("A:A")) Is Nothing Then Exit Sub
On Error GoTo CleanUp:
With Target
If .Value <> "" Then
Application.EnableEvents = False
'Here are the formulas to carry down to new records.
.Offset(0, 3).FormulaR1C3 = "=RC[-1]=$B2"
.Offset(0, 10).formulaR1C10 = "=RC[-1]=$J2"
End If
End With
CleanUp:
Application.EnableEvents = True
For instance, in the last column IV, there is a named range called
AbbNames that is defined as =OFFSET(Abbreviated,0,246). AbbNames does
not now update with new records. However, Abbreviated, which is
another named range, does update.
Basically, I need a way to add new records both with and without the
use of the data form, which extends formulas.
Thanks,
Arnold
I obtained code from a thread "Automatically fill down formulas when
adding a record" and modified it because I had more formulas in more
columns to carry down to new records. It works but it also interferes
with other Worksheet_Change events.
If Target.Cells.Count > 1 Then Exit Sub
If Intersect(Target, Me.Range("A:A")) Is Nothing Then Exit Sub
On Error GoTo CleanUp:
With Target
If .Value <> "" Then
Application.EnableEvents = False
'Here are the formulas to carry down to new records.
.Offset(0, 3).FormulaR1C3 = "=RC[-1]=$B2"
.Offset(0, 10).formulaR1C10 = "=RC[-1]=$J2"
End If
End With
CleanUp:
Application.EnableEvents = True
For instance, in the last column IV, there is a named range called
AbbNames that is defined as =OFFSET(Abbreviated,0,246). AbbNames does
not now update with new records. However, Abbreviated, which is
another named range, does update.
Basically, I need a way to add new records both with and without the
use of the data form, which extends formulas.
Thanks,
Arnold