Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sub wrap()
- ' wrap log lines suchas "23/12/2020 14:06:22 Maxime Jolly - Casque - Evole 40MS - 47 - 1 - mjolly - DSI-CDS - SAM"
- Set f = Sheets("SAM")
- Dim data() As Variant
- Dim TotalRows As Long
- Dim model As String
- TotalRows = f.Cells.SpecialCells(xlLastCell).Row + 1
- TotalRows = f.Range("O" & TotalRows).End(xlUp).Row
- ReDim Preserve data(1 To 8, 1 To TotalRows)
- For i = 2 To TotalRows
- model = f.Range("O" & i).Value
- Dim WrdArray() As String
- WrdArray() = Split(model, " - ")
- data(1, i - 1) = WrdArray(0) 'date + adm
- data(2, i - 1) = WrdArray(1) 'type
- data(3, i - 1) = WrdArray(2) 'model
- data(4, i - 1) = WrdArray(3) 'price
- data(5, i - 1) = WrdArray(4) 'quantity
- data(6, i - 1) = WrdArray(5) 'login
- data(7, i - 1) = WrdArray(6) 'team
- data(8, i - 1) = WrdArray(7) 'center
- Next
- For j = LBound(data) To TotalRows - 1
- Debug.Print data(1, j) & " --> " & data(2, j) & " --> " & data(3, j) & " --> " & data(4, j) & " --> " & data(5, j) & " --> " & data(6, j) & " --> " & data(7, j) & " --> " & data(8, j)
- Next j
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement