After reading some similar threads and also googling around (which takes pretty much time), I was able to put together a functional version of code, that does exactly what I want. So here it is, if anybody is dealing with same problem:
Public Sub SerialSearch()
Dim cell1 As Range
Dim Source As Range
Dim cell2 As Range
Dim Target As Range
Set Source = Application.InputBox( _
Prompt:="Please enter a source range to search for", _
Title:="InputSerialNumber", _
Default:=ActiveCell.Address, _
Type:=8)
If Source Is Nothing Then
MsgBox "No source range selected"
End If
On Error Resume Next
Set Target = Application.InputBox( _
Prompt:="Please enter a target range to search in", _
Title:="OutputSerialNumber", _
Default:=ActiveCell.Address, _
Type:=8)
If Target Is Nothing Then
MsgBox "No source range selected"
End If
On Error Resume Next
For Each cell1 In Source
With Target
Set cell2 = .Find(cell1.Value, LookIn:=xlValues)
If cell2.Value <> cell1.Value Then
cell1.Interior.ColorIndex = 3 'When searching serial numb. is not found, change its cell color into red
Else
Worksheets("Source").Activate
Set aaa = ActiveSheet.Range(cell1.Offset(0, -1), cell1.Offset(0, 32))
aaa.Copy
Worksheets("Target").Activate
cell2.Offset(0, -1).Select
ActiveSheet.Paste
End If
End With
Next cell1
End Sub
Bookmarks