This will blow up C,D and E for you but you cant have just FT in the description:
Sub Perm(): Dim ws As Worksheet, c As Integer
Dim R As Range, i As Long, j As Long, lr As Long, R1, R2
Set ws = Sheets("Original Rpt")
lr = ws.Range("C" & Rows.count).End(xlUp).row: i = 2
Do Until i > lr: Set R = Range("C" & i): c = Len(R) Mod 3
If c Then
For j = 1 To c: R.EntireRow.Copy
ws.Cells(i + j, 1).EntireRow.Insert: Next j
R = Replace(R, ",", "")
R1 = Replace(R.Offset(0, 1), ",", "")
R2 = Replace(R.Offset(0, 2), ",", "")
For j = c To 1 Step -1
R.Offset(j, 0) = Right(R, 3): R = Left(R, Len(R) - 3)
R.Offset(j, 1) = Right(R1, 7): R1 = Trim(Left(R1, Len(R1) - 7))
R.Offset(j, 2) = Right(R2, 10)
If Len(R2) > 10 Then R2 = Trim(Left(R2, Len(R2) - 10))
If j = 1 Then
R.Offset(0, 1) = R1: R.Offset(0, 2) = R2
End If
Next j
End If: i = i + c + 1: lr = lr + c: Loop
Application.CutCopyMode = False
End Sub
Copy the code to the clipboard
Press ALT + F11 to open the Visual Basic Editor.
Select Module from the Insert menu
Type "Option Explicit" then paste the code into the white space on the right.
With the cursor between Sub and End Sub press F5 OR
Press ALT + Q to close the code window.
Press ALT + F8 then double click on the macroname (Perm)
Bookmarks