|
参与一下。。。
- Sub ykcbf() '//2024.6.28
- Set d = CreateObject("Scripting.Dictionary")
- With Sheets("weekly")
- c1 = .UsedRange.Columns.Count
- st = .[h10].Value
- For j = 1 To c1
- s = .Cells(11, j)
- d(s) = j
- Next
- End With
- ReDim brr(1 To 10000, 1 To 100)
- With Sheets("8D List")
- c = .UsedRange.Columns.Count
- r = .Cells(Rows.Count, 1).End(3).Row
- arr = .[a1].Resize(r, c)
- For i = 2 To UBound(arr)
- If arr(i, 1) = st Then
- m = m + 1
- For j = 1 To c
- s = arr(1, j)
- If d.exists(s) Then
- brr(m, d(s)) = arr(i, j)
- End If
- Next
- End If
- Next
- End With
- With Sheets("weekly")
- .[a12:j10000] = ""
- If m > 0 Then
- .[a12].Resize(m, c1) = brr
- Else
- MsgBox "没查到相应记录!"
- End If
- End With
- Set d = Nothing
- MsgBox "OK!"
- End Sub
复制代码
|
评分
-
2
查看全部评分
-
|