Hi,
I have written a very simple code to understand how the for loops work in VBA. I would like to add the letters dd in column 3 if column 2 = F2000.
This is what I have:
Sub dd()
Dim i As Long
Dim j As Long
For i = 1 To i = 3
For j = 1 To j = 2
If Cells(i, 2) = F2000 Then
Cells(i, 3) = dd
End If
Next j
Next i
End Sub
Why is this not working?? I don't get any error messages from excel but nothing happens.
Thanks for your help!!!
I have written a very simple code to understand how the for loops work in VBA. I would like to add the letters dd in column 3 if column 2 = F2000.
This is what I have:
Sub dd()
Dim i As Long
Dim j As Long
For i = 1 To i = 3
For j = 1 To j = 2
If Cells(i, 2) = F2000 Then
Cells(i, 3) = dd
End If
Next j
Next i
End Sub
Why is this not working?? I don't get any error messages from excel but nothing happens.
Thanks for your help!!!