decci_7
New Member
- Joined
- Jul 17, 2006
- Messages
- 22
General info on script functionality
It compares two column values from excel sheet and carries out a particular task after getting the desired results
It compares two column values from excel sheet and carries out a particular task after getting the desired results
Code:
Sub checkdata()
Range("A1").Select
Do Until Selection.Value = ""
v1 = Selection.Value
v2 = Selection.Offset(0, 1).Value
If v1 = v2 Then
Selection.Offset(0, 3).Value = "Y"
Else
Selection.Offset(0, 3).Value = "N"
End If
Selection.Offset(1, 0).Select
Loop
End Sub