This Blog post show you how to copy and paste content from a sheet to another sheet in Excel Macro. This code is done by our student as assignment.
public sub test()
Dim i, k As Integer
Set s1 = Sheets("0728D")
Set s2 = Sheets("sheet2")
i = 1
k = 1
Do Until IsEmpty(s1.Range("b" & i))
If s1.Range("b" & i).Value = "MCA" Then
s2.Rows(k).Value = s1.Rows(i).Value
k = k + 1
End If
i = i + 1
Loop
End Sub
Copy and Paste Content From a sheet to Another sheet in Excel Macro