Hello,
I need some help with a Macro to add a formula to the first column of a table when a new row is added. The rows are added automatically when a Microsoft form is submitted. This is what I have....
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim tbl As ListObject
Dim newRow As ListRow
Set tbl = ActiveSheet.ListObjects(1)
If Target.Address = tbl.ListColumns(1).DataBodyRange.Cells(tbl.ListRows.Count).Address Then
Set newRow = tbl.ListRows.Add
newRow.Range.Cells(1, 1).Formula = "=IF(TODAY()>Defects[28 Day Deadline],""Past SLA"",""Open"")"
End If
End Sub
Any help greatly appreciated!
Bookmarks