korhan
Board Regular
- Joined
- Nov 6, 2009
- Messages
- 215
Here is a piece of my code:
Basically, I am trying to get UsedRange from one workbook and use it as a range in VLOOKUP statement.
'usedRangeDestination.Select
For i = 2 To FinalRowMain
strRecipient = Application.VLookup(wsMain.Cells(i, 3), usedRangeDestination.Address, 3, False)
On Error Resume Next
If Recipient = "Error 2042" Then
'nothing found'
ElseIf Recipient = wsMain.Cells(FinalRowMain, 3) Then
wsMain.Cells(FinalRowMain, 14) = "Match"
End If
Next i
wbDestination.Close
myFileName = Dir
Is this possible?
Basically, I am trying to get UsedRange from one workbook and use it as a range in VLOOKUP statement.
'usedRangeDestination.Select
For i = 2 To FinalRowMain
strRecipient = Application.VLookup(wsMain.Cells(i, 3), usedRangeDestination.Address, 3, False)
On Error Resume Next
If Recipient = "Error 2042" Then
'nothing found'
ElseIf Recipient = wsMain.Cells(FinalRowMain, 3) Then
wsMain.Cells(FinalRowMain, 14) = "Match"
End If
Next i
wbDestination.Close
myFileName = Dir
Is this possible?