I am working with two different workbooks. WB1=Destination data, WB2=Source. I am trying to do a lookup and match between the wb, using wb2 to find the match in WB1. Once the match is found, copy the row (not including value in column A, the search term). This is the range of B20:Y20. The search term and matching is in Column A in both wb. Each workbook will have a different date/number with the name. This is what I have so far and can't seem to get it to copy and paste the data correctly.
Sub FindAndCopyAdjacent()
Dim wbDest As Workbook
Dim wbSource As Workbook
Dim wb As Workbook ', wb As Workbook
' Loop through all open workbooks to find the destination workbook
For Each wb In Workbooks
If InStr(1, wb.Name, "Table Games Lines", vbTextCompare) > 0 Then
Set wbDest = wb
Exit For
End If
Next wb
' Loop through all open workbooks to find the source workbook
For Each wb In Workbooks
If InStr(1, wb.Name, "IGTHeadcount", vbTextCompare) > 0 Then
Set wbSource = wb
Exit For
End If
Next wb
Dim wsSource As Worksheet, wsLookup As Worksheet, wsTarget As Worksheet
Dim searchValue As Variant
Dim rngFound As Range, firstAddress As String
Dim lastRow As Long, targetRow As Long
' Set your sheets
Set wsSource = wb.Sheets("Headcount") ' Sheet with values to search
Set wsLookup = wb.Sheets("Headcount") ' Sheet where matches are found
Set wsTarget = wbDest.Sheets("Previous Wk (MONDAY)") ' Sheet to paste results
' Example: search value from Sheet1 cell A2
searchValue = wsSource.Range("A").Value
' Validate search value
If IsEmpty(searchValue) Then
MsgBox "Search value is empty. Please enter a value in Sheet1!A2.", vbExclamation
Exit Sub
End If
' Find first match in lookup sheet (searching Column A)
With wsLookup.Range("A:A")
Set rngFound = .Find(What:=searchValue, LookIn:=xlValues, LookAt:=xlWhole)
If rngFound Is Nothing Then
MsgBox "No match found for '" & searchValue & "'.", vbInformation
Exit Sub
End If
firstAddress = rngFound.Address
targetRow = wsTarget.Cells(wsTarget.Rows.Count, "A").End(xlUp).Row + 1
' Loop through all matches
Do
' Copy adjacent cell (Column B in this example) to target sheet
wsTarget.Cells(targetRow, "A").Value = rngFound.Value
wsTarget.Cells(targetRow, "B").Value = rngFound.Offset(0, 1).Value
targetRow = targetRow + 1
' Find next match
Set rngFound = .FindNext(rngFound)
Loop While Not rngFound Is Nothing And rngFound.Address <> firstAddress
End With
MsgBox "Copy complete.", vbInformation
End Sub
Table games lines worksheets Previous Wk (MONDAY). Of course this will change is day of the week. where data is going to go:

IGTHeadcount worksheets Headcount where i am getting data and using it to get name to lookup to match to TGL:
