L
LenC
can someone help with this please............
I have wrote this small code and it wont work.
Range("m13").Name = "dat"
Range("bl14").Name = "res"
Dim colu
Dim rower
For colu = 0 To 48
For rower = 0 To -10
If Range("dat").Offset(rower, colu) = "X" Then
Range("res").Select
Range("res").Offset(0, colu) = rower * 2
End If
Next colu
If Range("dat").Offset(rower, colu) = "" Then
Range("res").Offset(0, colu) = rower * 2
End If
Next rower
End Sub
Because it stops and next colu is highlighted with the error message
COMPILE ERROR
INVALID NEXT CONTROL VARIABLE REFERENCE
I cant see whats wrong with it so I hope one of the subscribers can
tell me the problem.
Thanks in anticipation
Len
I have wrote this small code and it wont work.
Range("m13").Name = "dat"
Range("bl14").Name = "res"
Dim colu
Dim rower
For colu = 0 To 48
For rower = 0 To -10
If Range("dat").Offset(rower, colu) = "X" Then
Range("res").Select
Range("res").Offset(0, colu) = rower * 2
End If
Next colu
If Range("dat").Offset(rower, colu) = "" Then
Range("res").Offset(0, colu) = rower * 2
End If
Next rower
End Sub
Because it stops and next colu is highlighted with the error message
COMPILE ERROR
INVALID NEXT CONTROL VARIABLE REFERENCE
I cant see whats wrong with it so I hope one of the subscribers can
tell me the problem.
Thanks in anticipation
Len