excel 2007若指定单元格被修改,自动填写日期到另一指定单元格,且次日打开日期不变
类似这种命令:=if(iserror(=SUM(B3)/(B3+L3))),"",(=SUM(B3)/(B3+L3)))PrivateSubWorksheet_Chang...
类似这种命令:
=if(iserror(=SUM(B3)/(B3+L3))),"",(=SUM(B3)/(B3+L3)))
Private Sub Worksheet_Change(ByVal Target As Range)If Target.Column = 2 And Target.Value <> "" ThenTarget.Offset(0, -1) = Format(Date, "yyyy.m.d")End If
End Sub 展开
=if(iserror(=SUM(B3)/(B3+L3))),"",(=SUM(B3)/(B3+L3)))
Private Sub Worksheet_Change(ByVal Target As Range)If Target.Column = 2 And Target.Value <> "" ThenTarget.Offset(0, -1) = Format(Date, "yyyy.m.d")End If
End Sub 展开
2个回答
展开全部
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 3 And And Target.Row = 3 AND Target.Value <> "" Then
Target.Offset(-2, 0) = Format(Date, "yyyy.m.d")
End If
End Sub
追问
不知道是不是我电脑的问题,没效果啊,我用的office2007
追答
Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 3 And Target.Row = 3 And Target.Value <> "" Then
Target.Offset(-2, 0) = Format(Date, "yyyy.m.d")
End If
End Sub
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询