A
april
i have this macro
Sub loopthrough()
Dim myRow As Integer
myRow = 1
Range("AI225").Select
Do Until myRow = 10
If ActiveCell.Offset(0, -15).Range("a1").Select = "General Research" Then
ActiveCell.Offset(0, 15).Range("a1") = "MIT0000"
End If
ActiveCell.Offset(1, 0).Select
myRow = myRow + 1
Loop
End Sub
1.want to start at cell ai225.
2. go to cell t225 and if the contents = General Research
3 then go to cell ai and enter MIT0000
4. go the the enxt row and do the same thing
problem is if t225 does not equal "General Research" the active cell is t225
and the next iteration takes me 15 rows over from t225. i want to start the
if statement from ai226
thanks in advance for you help. i just thought of something - i could get
it back to ai 225 by making the alternative to MIT0000 a blank but i don't
know the code protocal for this.
Sub loopthrough()
Dim myRow As Integer
myRow = 1
Range("AI225").Select
Do Until myRow = 10
If ActiveCell.Offset(0, -15).Range("a1").Select = "General Research" Then
ActiveCell.Offset(0, 15).Range("a1") = "MIT0000"
End If
ActiveCell.Offset(1, 0).Select
myRow = myRow + 1
Loop
End Sub
1.want to start at cell ai225.
2. go to cell t225 and if the contents = General Research
3 then go to cell ai and enter MIT0000
4. go the the enxt row and do the same thing
problem is if t225 does not equal "General Research" the active cell is t225
and the next iteration takes me 15 rows over from t225. i want to start the
if statement from ai226
thanks in advance for you help. i just thought of something - i could get
it back to ai 225 by making the alternative to MIT0000 a blank but i don't
know the code protocal for this.