|
我来了
- Private Sub Worksheet_Change(ByVal Target As Range)
- Debug.Print "Change", Target.Row, Target.Column
- ''禁用事件
- Application.EnableEvents = False
- On Error GoTo here
- If Target.Row > 3 And Target.Column = 5 Then
- For i = Target.Row - 1 To 3 Step -1
- If Cells(i, 5).Value = Target.Value Then
- Cells(Target.Row, 6).Value = Cells(i, 6).Value
- Cells(Target.Row, 7).Value = Cells(i, 7).Value
- Cells(Target.Row, 8).Value = Cells(i, 8).Value
- Exit For
- End If
- Next i
- End If
- here:
- ''启用事件
- Application.EnableEvents = True
- End Sub
复制代码 |
评分
-
1
查看全部评分
-
|