|
- Private Sub Worksheet_Change(ByVal Target As Range)
- If Target.Column = 5 And Target.Row > 2 Then
- If Len(Target.Value) Then
- If Len(Target.Offset(, 2)) Then
- Target.Offset(, 1) = Target.Value * Target.Offset(, -1)
- Target.Offset(, 3) = Target.Offset(, 1) + Target.Offset(, 2)
- Target.Offset(, 5) = Date
- Else
- Target.Offset(, 1) = Target.Value * Target.Offset(, -1)
- Target.Offset(, 3) = Target.Offset(, 1)
- Target.Offset(, 5) = Date
- End If
- Else
- Target.Offset(, 1) = ""
- Target.Offset(, 3) = ""
- Target.Offset(, 5) = ""
- End If
- End If
- End Sub
复制代码 |
评分
-
1
查看全部评分
-
|