|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
- Private Sub CommandButton1_Click()
- Application.DisplayAlerts = False
- Dim ar As Long
- ar = [B65536].End(3).Row
- arr = Range("B4:C" & ar)
- Set d = CreateObject("scripting.dictionary")
- For i = 1 To UBound(arr)
- If arr(i, 2) = "已完成" Then
- d(arr(i, 1) & "," & arr(i, 2)) = ""
- End If
- Next
- Sheets("提取").[B2].Resize(d.Count) = Application.Transpose(d.keys)
- Sheets("提取").[B2].Resize(d.Count).TextToColumns comma:=True
- Application.DisplayAlerts = True
- End Sub
复制代码 |
|