Sub macro()
Dim F1 As Worksheet, F2 As Worksheet
Dim PF1 As Range, PF2 As Range
Set F1 = Sheets("HEADER"): Set F2 = Sheets("DETAIL")
Set PF1 = F1.Range("C2:C" & [C65536].End(xlUp).Row)
Set PF2 = F2.Range("C2:C" & [C65536].End(xlUp).Row)
Application.ScreenUpdating = False
For i = 2 To PF1.Rows.Count
If F1.Cells(i, "C") = F2.Cells(i, "C") Then
With F1.Rows(F1.Cells(i, "C").Row)
.Copy
Sheets("Compilation").[A65536].End(xlUp).Offset(1, 0).PasteSpecial xlValues
End With
With F2.Rows(F2.Cells(i, "C").Row)
.Copy
Sheets("Compilation").[A65536].End(xlUp).Offset(1, 0).PasteSpecial xlValues
End With
End If
Next
Application.CutCopyMode = False
Application.ScreenUpdating = True
End Sub