kyriakos70
Programmer
Hello,
I have this vbscript:
Sub Find_Matches()
Dim CompareRange As Variant, b As Variant, a As Variant, x As Variant, y As Variant, z As Variant, CompareRange2 As Variant
Set CompareRange = Range("C1:C10")
Set CompareRange2 = Range("A1:A10")
For Each a In Selection(F16)
For Each x In Selection(E16)
For Each y In CompareRange
For Each z In CompareRange2
If x = y And a = z Then x.Offset(0, 1) = "YPARXEI" Else x.Offset(1, 2) = "den YAPARXEI"
Next z
Next y
Next a
Next x
End Sub
What I want to do is to compare the cell values of column C and A of the Same row with the values of the cells Of the selection F16 E16 and post a message when both values are equal.
The above code is not working.
Thank you
Kyriakos
I have this vbscript:
Sub Find_Matches()
Dim CompareRange As Variant, b As Variant, a As Variant, x As Variant, y As Variant, z As Variant, CompareRange2 As Variant
Set CompareRange = Range("C1:C10")
Set CompareRange2 = Range("A1:A10")
For Each a In Selection(F16)
For Each x In Selection(E16)
For Each y In CompareRange
For Each z In CompareRange2
If x = y And a = z Then x.Offset(0, 1) = "YPARXEI" Else x.Offset(1, 2) = "den YAPARXEI"
Next z
Next y
Next a
Next x
End Sub
What I want to do is to compare the cell values of column C and A of the Same row with the values of the cells Of the selection F16 E16 and post a message when both values are equal.
The above code is not working.
Thank you
Kyriakos