Hi BhuvanRam
The following code should be pasted in to the Macro sheet for Sheet2. Do do this, open the VBA Editor and double click Sheet2 on the left hand side.
It will run every time that sheet is activated.
Private Sub Worksheet_Activate()
Dim rRow As Range, CurRow As Single
CurRow = 2
'Clear Sheet 2 to make room for the new data
ActiveSheet.UsedRange.ClearContents
'Do this for each row on Sheet1
For Each rRow In Sheets("Sheet1").UsedRange.Rows
'It it's the same, or the header row, copy it
If rRow.Cells(1, 3) = "Same" Or rRow.Row = 2 Then
rRow.Copy Destination:=ActiveSheet.Cells(CurRow, 1)
CurRow = CurRow + 1
End If
Next rRow
End Sub
Best regards, Rob.
Bookmarks