I would like to copy and paste rows from my master sheet. I have created this VBA
Private Sub CommandButton3_Click()
a = Worksheets("Monthly VGT Report").Cells(Rows.Count, 1).End(xlUp).Row
For i = 2 To a
If Worksheets("Monthly VGT Report").Cells(i, 2).Value = "531204" Then
Worksheets("Monthly VGT Report").Rows(i).Copy
Worksheets("Store 1").Activate
b = Worksheets("Store 1").Cells(Rows.Count, 1).End(xlUp).Row
Worksheets("Store 1").Cells(b + 1, 1).Select
ActiveSheet.Paste
Worksheets("Monthly VGT Report").Activate
End If
Next
Application.CutCopyMode = False
ThisWorkbook.Worksheets("Monthly VGT Report").Cells(1, 1).Select
End Sub
This work perfectly however, is there a way I can have it copy multiple searches with just one active command button. Right now I have 6 buttons that are searching different key words. For example: If Worksheets("Monthly VGT Report").Cells(i, 2).Value = "531204" Then
.
Is there way to search for the number "531204" & " 542376" within one code ? The data that I am searching for is in column B and my data started in column A. I want the whole row A1:H1 copied.