|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
参与一下。。。
- Private Sub Worksheet_Change(ByVal Target As Range)
- If Target.Address = "$M$1" Then
- num = Me.[m1]
- r = Me.Cells(Rows.Count, 2).End(3).Row
- arr = Me.[a1].Resize(r, 11)
- ReDim brr(1 To r, 1 To 1)
- For j = 2 To UBound(arr, 2)
- If arr(1, j) = num Then
- For i = 3 To UBound(arr)
- m = m + 1
- brr(m, 1) = arr(i, j)
- Next
- End If
- Next
- Me.[m3].Resize(m, 1) = brr
- ' If k = 0 Then
- ' m1 = Range("b" & Rows.Count).End(3).Row
- ' arr = Range("b1:k1")
- ' w = Application.Match(l, arr, 0)
- ' a = Range("a3:a" & m1).Offset(0, w)
- ' End If
- ' Range("m3").Resize(UBound(a), 1) = a
- End If
- End Sub
复制代码
|
评分
-
1
查看全部评分
-
|