|
- Private Sub Worksheet_Change(ByVal Target As Range)
- On Error Resume Next
- If Target.Count = 1 Then
- If Target = Cells(Rows.Count, "B").End(xlUp) Then
- Application.EnableEvents = False
- Target.AutoFill Destination:=Range(Target, Cells(Rows.Count, "A").End(xlUp).Offset(0, 1))
- Target.Offset(0, 2) = "错误"
- Application.EnableEvents = True
- Cells(Rows.Count, "A").End(xlUp).Offset(1, 0).Select
- End If
- End If
- End Sub
复制代码 你用这个代码试试,错误可以弄出来,但那个正确有点摸不着头脑! 不晓得何时来触发!
既然现在有了错误,其他空单元格就是正确,也可以用了 |
|