|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
还可以更快:
- Sub 秒填答案_ByZL()
- Dim arr, mh, strA$, i%, t
- t = Timer
- Set rng = ActiveDocument.Range
- strA = ActiveDocument.Range.Text
- With CreateObject("vbscript.regexp")
- .Global = True
- .Pattern = "(\d+)\.([A-Ea-e])(?=\W)"
- Set arr = .Execute(rng)
- .Pattern = "\([\u00A0]{3,}\)"
- For Each mh In .Execute(strA)
- strA = Replace(strA, mh, "( " & arr(i).submatches(1) & " )", , 1)
- i = i + 1
- Next
- End With
- ActiveDocument.Range.Text = strA
- MsgBox Timer - t
- End Sub
复制代码
|
评分
-
1
查看全部评分
-
|