|
- Private Sub Worksheet_Change(ByVal Target As Range)
- Set Rng = Application.Intersect(Union([b3:f302], [h3:j302]), Target)
- If Rng Is Nothing Then Exit Sub
- Application.ScreenUpdating = False
- Application.EnableEvents = False
- For Each rn In Rng.Columns(1)
- If Cells(rn.Row, "f") = Cells(rn.Row, "h") Then
- For i = 2 To 6
- Cells(rn.Row, i + 10) = Cells(rn.Row, i)
- Next i
- Cells(rn.Row, 17) = Cells(rn.Row, 9)
- Cells(rn.Row, 18) = Cells(rn.Row, 10)
- End If
- Next rn
- Application.EnableEvents = True
- Application.ScreenUpdating = True
- End Sub
复制代码 |
|