|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
本帖最后由 longwin 于 2024-7-11 20:50 编辑
是的,可以将数字+/的组合替换为数字+|,不能只按照0+/判断
Sub test()
arr = Range("F2:F6")
ReDim brr(1 To UBound(arr), 1 To 10)
For i = 1 To UBound(arr)
s1 = arr(i, 1)
For k = 0 To 9
s1 = Replace(s1, CStr(k) & "/", CStr(k) & "|")
Next
crr = Split(s1, "|")
For j = 0 To UBound(crr)
drr = Split(crr(j), "*")
For j2 = 0 To UBound(drr)
brr(i, j * 2 + 1 + j2) = drr(j2)
Next
Next
Next
[g1].Resize(UBound(brr), UBound(brr, 2)) = brr
End Sub
|
|