vba代码如下(注意:这是事件代码,放在thisworkbook对象下)
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
'当sheet1表的A列改变时,在B3单元格内显示当前日期
Dim strSpecialCol$, strCourCol$
strSpecialCol = "A"
strCourCol = Replace(Replace(Cells(1, Target.Column).Address, "$", ""), "1", "")
If LCase(Sh.Name) = "sheet1" And strSpecialCol = strCourCol Then
[B3] = Date
End If
End Sub
这个只能用VBA的
给你个例子吧,注意需要在Workbook Open、Sheet selectionchange 、Sheet Change三处使用代码
设置B3的函数即可