I am trying to compare each cell in a i.e. A1 with B1 and if it is true i will populate the cell F1 with A1 value.....But irrespective of my input values the if condition becomes true....can anybody help me in this. My code goes like this
Code:
Sub Macro3() ' ' Macro3 Macro ' Dim i As Integer i = 1 For i = 1 To 10 If (Range("A" & i).Select = Range("B" & i).Select) Then Range("A" & i).Select Selection.Copy Range("F" & i).Select ActiveSheet.Paste End If Next i End Sub
Comment