|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
Option Explicit
Sub TEST1()
Dim ar, br, cr, i&, j&, r&, iColSize&
r = Cells(Rows.Count, "A").End(xlUp).Row
ar = Range("A1:A" & r).Value
ReDim br(1 To UBound(ar), 10 ^ 3)
With CreateObject("VBScript.RegExp")
.Global = True
.Pattern = "[\-\/\\]"
For i = 1 To UBound(ar)
ar(i, 1) = .Replace(ar(i, 1), " ")
cr = Split(ar(i, 1))
If UBound(cr) + 1 > iColSize Then iColSize = UBound(cr) + 1
For j = 0 To UBound(cr)
br(i, j) = cr(j)
Next j
Next i
End With
[B1].Resize(UBound(br), iColSize) = br
Beep
End Sub
|
评分
-
2
查看全部评分
-
|