|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
程序如下
Private Sub Worksheet_Change(ByVal Target As Range)
If Application.Intersect(Target, Range("c3:c65536")) Is Nothing Or Target.Count > 1 Then
Exit Sub
End If
Dim i As Integer
i = 3
Do While Cells(i, "I").Value <> ""
If UCase(Target.Value) = Cells(i, "I").Value Then
Application.EnableEvents = False
Target.Value = Cells(i, "I").Offset(0, 1).Value
Target.Offset(0, -1).Value = Date
Target.Offset(0, 1) = Cells(i, "I").Offset(0, 2).Value
Target.Offset(0, 2) = Cells(i, "I").Offset(0, 3).Value
Target.Offset(0, 3).Select
Application.EnableEvents = True
Exit Sub
End If
i = i + 1
Loop
End Sub
还有就是这个<>""符号在之前也出现过,但是在之前的程序中始终无法运行
|
|