|
发表于 2017-4-20 16:03
|
显示全部楼层
本楼为最佳答案
- Option Explicit
- Sub SplitInfo()
- Dim arrSrc, arrRst()
- Dim lrow&, lCnt&, lCount&
- Dim icol%, iLocal%
- Dim strText$
- arrSrc = Range("a2:a" & Cells(Rows.Count, 1).End(3).Row).Value
- For lrow = 1 To UBound(arrSrc) Step 4
- For lCnt = lrow To lrow + 3
- strText = strText & arrSrc(lCnt, 1)
- Next
- For icol = 1 To Len(strText) / 4
- For iLocal = icol To Len(strText) Step 3
- lCount = lCount + 1
- ReDim Preserve arrRst(1 To lCount)
- arrRst(lCount) = Mid(strText, iLocal, 1)
- Next
- Next
- strText = ""
- Next
- Range("d2").Resize(lCount) = Application.Transpose(arrRst)
- End Sub
复制代码 |
评分
-
查看全部评分
|