Here is something you can work with, this is only an example and in no means considered an answer.
You will have to work on it to get your formats the way you want.
Sub Something()
Dim sh2 As Worksheet, sh3 As Worksheet
Dim myarray As Variant
Dim Rws As Long, Rng As Range
Dim FrNg As Range, f As Range
Set sh2 = Worksheets("Input-data")
Set sh3 = Worksheets("Intermediate Outputs")
myarray = Array("CBUSH", "PBUSH", "CONM2")
Application.ScreenUpdating = 0
For i = LBound(myarray) To UBound(myarray)
With sh2
Rws = .Cells(Rows.Count, "A").End(xlUp).Row
Set Rng = .Range(.Cells(1, 1), .Cells(Rws, 1))
Rng.AutoFilter Field:=1, Criteria1:=myarray(i)
Set FrNg = .Range(.Cells(2, 1), .Cells(Rws, 1)).SpecialCells(xlCellTypeVisible)
For Each f In FrNg.Cells
If f = "CONM2" Then
f.Range("A1:K1").Copy Destination:=sh3.Cells(Rows.Count, "A").End(xlUp).Offset(1, 0)
sh3.Cells(Rows.Count, "A").End(xlUp).Offset(1, 0) = "something "
sh3.Cells(Rows.Count, "A").End(xlUp).Offset(0, 1) = "something else "
sh3.Cells(Rows.Count, "A").End(xlUp).Offset(0, 2) = "Post "
sh3.Cells(Rows.Count, "A").End(xlUp).Offset(0, 3) = "Ops "
End If
If f = "PBUSH" Then f.Range("A1:K1").Copy Destination:=sh3.Cells(Rows.Count, "M").End(xlUp).Offset(1, 0)
If f = "CBUSH" Then f.Range("A1:K1").Copy Destination:=sh3.Cells(Rows.Count, "X").End(xlUp).Offset(1, 0)
Next f
.AutoFilterMode = 0
End With
Next
End Sub
Bookmarks