|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
借屍還魂>>過河拆橋
Sub a()
Dim dic As Object, arr
Columns("D:E").ClearContents
Set dic = CreateObject("scripting.dictionary")
arr = Range("A1").CurrentRegion
For i = 1 To UBound(arr)
t1$ = arr(i, 1): t2$ = arr(i, 2)
If t2 = "bbbbb" Then t1 = "XXXX+++" & t1: t2 = ""
dic(t1) = t2
Next
With Range("D1").Resize(dic.Count, 2)
.Value = Application.Transpose(Array(dic.keys, dic.items))
.Replace "+++*", "", lookat:=xlPart
End With
Set dic = Nothing
End Sub
|
评分
-
2
查看全部评分
-
|