This should do it, it's not fast, but it does the work:
Option Explicit
Sub RowFormatColumnData()
Dim Faults As Range
Dim LastRw As Long, Rw As Long
Application.ScreenUpdating = False
LastRw = Range("A" & Rows.Count).End(xlUp).Row
For Rw = LastRw To 2 Step -1
Set Faults = Range(Cells(Rw, "D"), Cells(Rw, Columns.Count).End(xlToLeft))
If Faults.Cells.Count > 1 Then
Range("D" & Rw + 1).Resize(Faults.Cells.Count - 1, 1).EntireRow.Insert xlShiftDown
With Faults.Resize(1, Faults.Cells.Count - 1).Offset(0, 1)
.Copy
Range("D" & Rw + 1).PasteSpecial xlPasteAll, Transpose:=True
.ClearContents
End With
End If
Next Rw
With Columns("A:C")
.SpecialCells(xlCellTypeBlanks).FormulaR1C1 = "=R[-1]C"
.Value = .Value
End With
Range("E1", Range("E1").End(xlToRight)).Clear
Range("D1") = "Fault"
Range("A2").Select
Range("A1").CurrentRegion.Columns.AutoFit
ActiveWindow.FreezePanes = True
Application.ScreenUpdating = True
End Sub
Bookmarks