|
已有附件宏,可以自动按要求自动填入!但有个小要求不知如何修改实现?有劳老师、高手们帮忙看看,万分感谢!
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub
If Target = "" Then Exit Sub
Application.EnableEvents = False
If Target.Column = 4 And Target.Row > 12 Then
If Len(Target) = 13 Then
Target.Value = "L" & Target
Target.Offset(0, -3).Formula = "=no"
Target.Offset(0, 2).Formula = "=ff"
Target.Offset(0, 9).Formula = "=mm"
Else
Target.Offset(0, -3).Formula = "=no"
Target.Offset(0, 2).Formula = "=ff"
Target.Offset(0, 9).Formula = "=mm"
End If
End If
Application.EnableEvents = True
If Target > 10000099800# Then Exit Sub
Application.EnableEvents = False
If Target.Column = 5 And Target.Row > 12 Then
If IsNumeric(Target) Then
Target = "10000" & Target
End If
End If
Application.EnableEvents = True
End Sub
|
|