Try this code - clear the data in the Outpot sheet (except for headers) and run the macro -
Option Explicit
Sub format_report()
Dim ws As Worksheet
Dim i As Long, lrow As Long
Application.ScreenUpdating = False
Set ws = Worksheets("Outpot")
With Worksheets("Input")
lrow = .Range("A" & Rows.Count).End(xlUp).Row
For i = 2 To lrow
If Not .Range("A" & i).Value Like "Input*" Then
.Range("A" & i & ":D" & i).Copy ws.Range("A" & Rows.Count).End(xlUp).Offset(1, 0)
Application.CutCopyMode = False
End If
Next i
End With
MsgBox "Done"
Application.ScreenUpdating = True
End Sub
Copy the Excel VBA code
Select the workbook in which you want to store the Excel VBA code
Hold the Alt key, and press the F11 key, to open the Visual Basic Editor
Choose Insert | Module
Where the cursor is flashing, choose Edit | Paste
To run the Excel VBA code:
Choose View | Macros
Select a macro in the list, and click the Run button
Bookmarks