|
本帖最后由 hefuqing 于 2018-8-29 20:24 编辑
- Sub ddd()
- Dim brr(), crr()
- r = Sheets("源").Cells(Sheets("源").Rows.Count, 1).End(xlUp).Row
- arr = Sheets("源").Range("a1:a" & r)
- ReDim brr(1 To r)
- For i = 1 To UBound(arr)
- n = n + 1
- brr(n) = Split(arr(i, 1), " ")
- Next
-
- ReDim crr(1 To UBound(brr), 1 To 6)
- crr(1, 1) = brr(1)(0)
- crr(1, 2) = brr(1)(4)
- crr(1, 3) = brr(1)(20)
- crr(1, 4) = brr(1)(21)
- crr(1, 5) = brr(1)(24)
- crr(1, 6) = brr(1)(30)
- m = 1
- For i = 2 To UBound(brr)
- m = m + 1
- If brr(i)(0) = "/" Then
- crr(m, 1) = brr(i)(0)
- crr(m, 2) = brr(i)(5)
- crr(m, 3) = brr(i)(25)
- crr(m, 4) = brr(i)(30)
- crr(m, 5) = brr(i)(38)
- crr(m, 6) = brr(i)(46)
- ElseIf brr(i)(0) = "" Then
- crr(m, 1) = ""
- crr(m, 2) = ""
- crr(m, 3) = ""
- crr(m, 4) = brr(i)(33)
- crr(m, 5) = brr(i)(36)
- crr(m, 6) = brr(i)(41)
- Else
- crr(m, 1) = brr(i)(0)
- crr(m, 2) = brr(i)(4) & brr(i)(5) & brr(i)(6) & brr(i)(7) & brr(i)(8)
- crr(m, 3) = brr(i)(10)
- crr(m, 4) = brr(i)(12)
- crr(m, 5) = brr(i)(15)
- crr(m, 6) = brr(i)(20)
- End If
- Next
- Sheets("果").[a1].Resize(UBound(crr), UBound(crr, 2)) = crr
- End Sub
复制代码 |
评分
-
1
查看全部评分
-
|