|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
Private Sub CommandButton1_Click()
Dim dic As Object, rng1
Sheets("筛选").Range("a2:d8").ClearContents
Set d = CreateObject("scripting.dictionary")
rng1 = Sheets("网络填报").UsedRange.SpecialCells(xlCellTypeVisible)
For i = 2 To UBound(rng1)
arrstring = rng1(i, 2) & "," & rng1(i, 4) & "," & rng1(i, 1) & "," & rng1(i, 3)
d(rng1(i, 2)) = arrstring
Next
n = 2
For Each s In d.items
Cells(n, 1).Resize(1, 4) = Split(s, ",")
n = n + 1
Next
End Sub
|
|