Hello it's my first time so sorry for any mistake.
I tried make macro which will compare to columns, one in one worksheet second in another. Of corse it sholud make it automaticly becouse i need compare about 2500 cells. Works fie but when I use "x" and "y" in IF formule I cant see masbox which sholud apper. When I put values for example x=5 it work. Why doesn't work with variables.
I make something like that :
Sub serch()
Dim x, y, i, j As Variant
For i = 2 To 6
For j = 2 To 6
Worksheets(2).Activate
Cells(i, 1).Select
x = Cells(i, 1).Value
MsgBox x
'Worksheets(1).Activate
Cells(j, 12).Select
y = Cells(j, 12).Value
MsgBox y
If x = y Then
MsgBox "!!"
End If
Next j
Next i
End Sub
Bookmarks