Create a module and copy & paste the below code
Public Sub copySelection()
On Error Resume Next
'#
'# declare private variables
'#
Dim pvt_obj_Target As Excel.Worksheet
Dim pvt_var_CopyColumn As Variant
Dim pvt_lng_SourceRow As Long
Dim pvt_lng_TargetRow As Long
Dim pvt_lng_TargetColumn As Long
'#
'# initialise
'#
Set pvt_obj_Target = ThisWorkbook.Worksheets("Sheet2")
pvt_lng_TargetRow = 1
With pvt_obj_Target
If .UsedRange.Rows.Count > 1 Then
.Rows("2:" & .UsedRange.Rows.Count).Delete
End If
End With
'#
'# loop for all rows on the source worksheet and copy selected columns to the target worksheet
'# for rows matching the selection criteria
'#
With ThisWorkbook.Worksheets("Sheet1")
For pvt_lng_SourceRow = 2 To .Cells(.Rows.Count, "A").End(xlUp).Row
'#
'# only select valid rows
'#
If .Cells(pvt_lng_SourceRow, "K").Value = "on-going" And _
(UCase$(.Cells(pvt_lng_SourceRow, "E").Value) Like "*ON-SITE*" Or _
UCase$(.Cells(pvt_lng_SourceRow, "E").Value) Like "*WORKSHOP*") Then
'#
'# raise the target row counter and copy the selected columns
'#
pvt_lng_TargetRow = pvt_lng_TargetRow + 1
pvt_lng_TargetColumn = 0
For Each pvt_var_CopyColumn In Array("A", "B", "E", "G", "H")
pvt_lng_TargetColumn = pvt_lng_TargetColumn + 1
pvt_obj_Target.Cells(pvt_lng_TargetRow, pvt_lng_TargetColumn).Value = .Cells(pvt_lng_SourceRow, pvt_var_CopyColumn).Value
Next pvt_var_CopyColumn
End If
Next pvt_lng_SourceRow
End With
End Sub
Bookmarks