- Sub yy()
- Dim Arr, i&, Myr&, Brr
- Myr = [a65536].End(xlUp).Row
- Range("d3:g" & Myr).ClearContents
- Range("i3:i" & Myr).ClearContents
- Arr = Range("a3:j" & Myr)
- ReDim Brr(1 To UBound(Arr), 1 To 7)
- For i = 1 To UBound(Arr)
- Brr(i, 1) = Left(Arr(i, 3), 5)
- Brr(i, 2) = Left(Right(Arr(i, 3), 11), 4)
- Brr(i, 3) = Left(Right(Arr(i, 3), 7), 1) & "#"
- Brr(i, 4) = Split(Arr(i, 3), "+")(1)
- Brr(i, 5) = Arr(i, 8)
- If Arr(i, 8) <> "" Then
- Brr(i, 6) = "C" & Right(Left(Arr(i, 3), 17), 16) & "-" & Arr(i, 8)
- Else
- Brr(i, 6) = ""
- End If
- Brr(i, 7) = Arr(i, 10)
- Next
- [d3].Resize(UBound(Brr), 7) = Brr
- End Sub
复制代码 |