I need to create a macro in excel to search through a column of numbers within a data report. First it copies and pastes the first three rows into another sheet. I then have 5 or 6 numbers that need to be individually found and have their entire row copied, as well as the two rows under the number. Then the three copied rows need to be pasted in another sheet. The macro needs to be set up so that if a number is not found, or is found and copy/pasted, it looks for the next number.

This is what I currently have with three of my chosen numbers to find:

Sub Search()
    Sheets("Combined_Analysis_Report ").Select
    Range("A1:R3").Select
    Selection.Copy
    Sheets("Test_Vehicles ").Select
    Range("A1").Select
    ActiveSheet.Paste
    Sheets("Combined_Analysis_Report ").Select
   On Error GoTo Err_Execute
   'Start search in row 4
   LSearchRow = 4
   'Start copying data to row 2 in Sheet2 (row counter variable)
   LCopyToRow = 4
   While Len(Range("B" & CStr(LSearchRow)).Value) > 0
     
      If Range("B" & CStr(LSearchRow)).Value = "1256" Then
         'Select row in Sheet1 to copy
         
         Rows(CStr(LSearchRow) & ":" & CStr(LSearchRow) + 2).Select
         Selection.Copy
         'Paste row into Sheet2 in next row
         Sheets("Test_Vehicles ").Select
         Rows(CStr(LCopyToRow) & ":" & CStr(LCopyToRow)).Select
         ActiveSheet.Paste
         'Move counter to next row
         LCopyToRow = LCopyToRow + 1
         'Go back to Sheet1 to continue searching
         Sheets("Combined_Analysis ").Select
      End If
    
      If Range("B" & CStr(LSearchRow)).Value = "1260" Then
         'Select row in Sheet1 to copy
         Rows(CStr(LSearchRow) & ":" & CStr(LSearchRow) + 2).Select
         Selection.Copy
         'Paste row into Sheet2 in next row
         Sheets("Test_Vehicles ").Select
         Rows(CStr(LCopyToRow) & ":" & CStr(LCopyToRow)).Select
         ActiveSheet.Paste
         'Move counter to next row
         LCopyToRow = LCopyToRow + 1
         'Go back to Sheet1 to continue searching
         Sheets("Combined_Analysis ").Select
      End If

       If Range("B" & CStr(LSearchRow)).Value = "1318" Then
         'Select row in Sheet1 to copy
         Rows(CStr(LSearchRow) & ":" & CStr(LSearchRow) + 2).Select
         Selection.Copy
         'Paste row into Sheet2 in next row
         Sheets("Test_Vehicles ").Select
         Rows(CStr(LCopyToRow) & ":" & CStr(LCopyToRow)).Select
         ActiveSheet.Paste
         'Move counter to next row
         LCopyToRow = LCopyToRow + 1
         'Go back to Sheet1 to continue searching
         Sheets("Combined_Analysis ").Select
      End If
      LSearchRow = LSearchRow + 3
   Wend
   'Position on cell A3
   Application.CutCopyMode = False
   Range("A").Select
   MsgBox "All matching data has been copied."
   Exit Sub
Err_Execute:
   MsgBox "One or more trucks not found."
End Sub
I appreciate any assistance!

Moderator Note:

Pls use code tags around your code next time as per forum rules.