|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
请看表格“类型汇总 (2)”,点击“提取”。请看是否符合你的要求?
Sub 提取责任人()
Range("c2:c10000").ClearContents
Set d = CreateObject("scripting.dictionary")
For Each Rng In Range("b2:b" & Cells(Rows.Count, 2).End(xlUp).Row)
Strs = Split(Rng, ",")
For Each sr In Strs
For Each rng2 In Sheet3.Range("a2:a" & Sheet3.Cells(Rows.Count, 1).End(xlUp).Row)
If sr = rng2 Then
kk = rng2(1, 2)
d(kk) = ""
End If
Next
Next
mm = Join(d.keys, ",")
Rng(1, 2) = mm
d.RemoveAll
Next
End Sub
|
评分
-
1
查看全部评分
-
|