Sub marketvalue()
Dim i, j As Integer
Dim tt, cc As Date
Set tbill = Workbooks("mv").Sheets("data")
Set aaa = Workbooks("財務資料").Sheets("sheet2")
For i = 2 To 1048576
For j = 2 To 1148
Let BCODE = tbill.Cells(i, 1)
tt = tbill.Range("B" & i).Value
cc = aaa.Range("A" & j).Value
With aaa.Range("E:E")
Set c = Cells.Find(what:=BCODE, After:=ActiveCell, LookIn:= _
xlFormulas, LookAt:=xlWhole, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False).Activate
If Not c Is Nothing Then
With aaa.Range("A:A")
Set dd = Cells.Find(what:=tt, After:=ActiveCell, LookIn:= _
xlFormulas, LookAt:=xlWhole, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False).Activate
If Not dd Is Nothing Then
tbill.Cells(i, 5).Copy Destination:=aaa.Cells(j, 15)
End If
End With
End If
End With
Next j
Next i
End Sub