Assuming you meant to write the value of "Total tasks" to column 3 on the database worksheet
Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next
'#
'# only execute the requested action if the change on the worksheet pertains to the value in the
'# dropdown box
'#
If Target.Address = "$B$8" Then
'#
'# create a new record on the database worksheet
'#
With ThisWorkbook.Worksheets("Database").Rows(Rows.Count).End(xlUp).Offset(1)
.Cells(, 1).Value = Format(Date, "yyyy/mm/dd")
.Cells(, 2).Value = Target.Value
.Cells(, 3).Value = Target.Parent.Cells(10, "D").Value
.Cells(, 4).Value = Format(Now, "hh:mm:ss")
End With
End If
End Sub
Bookmarks