Hello Everyone,

I'm cracking my head over VBA codes that would help me, copy a set of data from a specific range in a workbook and paste it to another workbook beside the dates in a row. I quite spent some time looking for solutions but most of the answers were for sheet to sheet transfers.
Ideally what I'm trying to do is

1. Copy data from customer workbook range A2:F5000 from Sheet 1
2. Activate target workbook and Sheet 1 and search in column B for the date that is equal to a date specified in Cell A1 in the target workbook
3. Paste the data in the target workbook beside the corresponding date
4. Save and close the customer workbook.

I have my code below but the search and the paste part is my issue.

I would appreciate it if someone could help me.Thanks

Sub Import()

Dim customerBook As Workbook
Dim filter As String
Dim caption As String
Dim customerFilename As String
Dim customerWorkbook As Workbook
Dim targetWorkbook As Workbook

' make assumption that active workbook is the target
Set targetWorkbook = Application.ActiveWorkbook

' get the customer workbook
filter = "Text files (*.xlsx),*.xlsx"
caption = "Please Select an input file "
customerFilename = Application.GetOpenFilename(filter, , caption)

Set customerWorkbook = Application.Workbooks.Open(customerFilename)

' copy data from customer to target workbook
Dim targetSheet As Worksheet
Set targetSheet = targetWorkbook.Worksheets(1)
Dim sourceSheet As Worksheet
Set sourceSheet = customerWorkbook.Worksheets(1)

targetSheet.Range("A2", "F50000").Value = sourceSheet.Range("A2", "F50000").Value

'should find search for a corresponding to a cell value in cell A1 in destination workbook and paste the data beside it

' Close customer workbook
customerWorkbook.Close

MsgBox "Imported"

End Sub