When they insert a new row, are they entering in data somewhere?
If so, then one way to do this would be when they enter something in a certain column, it automatically checks the value in another column, and if that column is blank, populate it with the desired data.
Does that sound like it would work?
If so, please provide us with the following:
- What column do you want "triggering" this to run when updated?
- What column is supposed to be updated?
- What date goes in this column (today's date, or some other date)?
Private Sub Worksheet_Change(ByVal Target As Range)
Dim rng As Range
Dim cell As Range
' See if updates cell in column C
Set rng = Intersect(Target, Columns("C:C"))
If rng Is Nothing Then Exit Sub
' Loop through updated cells in column C
For Each cell In rng
' Exclude title row
If cell.Row > 1 Then
' Populate column B with date
If cell <> "" Then
Application.EnableEvents = False
cell.Offset(0, -1) = DateSerial(2019, 9, 1)
Application.EnableEvents = True
End If
End If
Next cell
End Sub
I am not sure I understand what you are saying about a formula...If I wanted to apply this to other worksheets but instead of copying the date it copied the formula, how would I go about it?