I have entered this code from your Macros class 3. the debug stops at the
" for i = 2 to a"
Private Sub CommandButton6_Click()
Dim i As Long
a = Worksheets("sheet1").Cells(Rows.Count, 1).End(xlUp)
For i = 2 To a
If Worksheets("sheet1").Cells(i, 3).Value = "north" Then
Worksheets("sheet1").Rows(i).Copy
Worksheets("sheet2").Activate
b = Worksheets("sheet2").Cells(Rows.Count, 1).End(xlUp).Row
Worksheets("sheet2").Cells(b + 1, 1).Select
ActiveSheet.Paste
Worksheets("sheet1").Activate
End If
Exit For
Next i
Application.CutCopyMode = False
ThisWorkbook.Worksheets("sheet1").Cells(1, 1).Select
End Sub
Thanks for your help carroll