在工作表标签上(就是显示Sheet1的地方)右键单击,选择“查看代码(V)”,在打开的VBA编辑器里把下面的代码贴进去,就可以实现你所需要的功能了。
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
With Target
If .Column <> 2 Then Exit Sub
For L = .Row To .Row + .Rows.Count - 1
T=Ucase(Trim(Cells(L, 2)))
If T = "OK" Or T = "N" Or T = "T" Then Cells(L, 1) = Format(Date, "yyyy/mm/dd")
Next
End With
Application.EnableEvents = True
End Sub
好像你说的不够明白,我没看懂你是说你要一直操作一个EXCEL,记录每次修改某个值的那天是什么时候?把日期转换成字符再写到EXCEL?可以不