how to copy a group of rows if cells in the first column equal a certain value.
this is the code i found online, but can't seem to get it to work, i think its because I've formated data on the sheet as a table.
Private Sub CommandButton1_Click()
a = Worksheets("inbd").Cells(Rows.Count, 1).End(xlUp).Row
For i = 2 To a
If Worksheets("inbd").Cells(i, 3).Value = 76 Then
Worksheets("inbd").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
Next
Application.CutCopyMode = False
ThisWorkbook.Worksheets("inbd").Cells(1, 1).Select
End Sub
Example of how table on "inbd" looks: