|
代码如下。。。
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$H$14" Then
rr = Val(Range("H13"))
If rr >= 7 Then
rr = -1
End If
Range("H13") = rr + 1
Range("h13").Select
End If
If Target.Address = "$H$22" Then
ss = Range("n3:n82")
s = [d1]
If s = "" Then
[d1] = ss(i, 1)
Else
w = Application.Match(s, ss, 0)
If w = UBound(ss) Then w = 0
[d1] = ss(w + 1, 1)
End If
[e2].Select
End If
If Not Intersect(Target, [h23:h32]) Is Nothing Then
[d1] = Target.Value
End If
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If Target.Address = "$H$13" Then
arr = [n3:n82]
ReDim brr(1 To 10, 1 To 1)
For i = 1 To 10
brr(i, 1) = arr(Target.Value * 10 + i, 1)
Next
[h23].Resize(10) = brr
End If
Application.EnableEvents = True
End Sub |
评分
-
1
查看全部评分
-
|