需要用vba
按ALT+F11,双击thisworkbook,粘贴下面的代码
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
On Error Resume Next
Application.EnableEvents = False
With Target
.Value = .Value & Format(Now, " yyyy-mm-dd hh:mm:ss")
End With
Application.EnableEvents = True
End Sub
刚刚的公式有误
辅助列公式为“=IF(B2="","",NOW())”
并将列格式设为日期时间型