|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
Sub Test_A1()
Dim Arr, xD, i&, N&, V&
Set xD = CreateObject("Scripting.Dictionary")
Arr = Range("C1", Cells(Rows.Count, "C").End(3))
For i = 1 To UBound(Arr): xD(Arr(i, 1)) = xD(Arr(i, 1)) & " " & i: Next
ReDim Arr(1 To UBound(Arr), 1 To 3)
For i = 1 To xD.Count
If i > 2 Then Exit For
V = Application.Large(xD.keys, i)
For Each a In Split(Trim(xD(V)), " ")
N = N + 1
Arr(N, 1) = "NO:" & i
Arr(N, 2) = V
Arr(N, 3) = a
Next
Next i
Columns("F:H").Clear
[F1].Resize(N, 3) = Arr
End Sub
|
|