Dear friends,
i have the following statement in a loop.
My question is if there's a way to declare as following:
I have tried any combination i could think of but i always get compilation or variables errors
Any ideas?
Thanks!!!!!
i have the following statement in a loop.
Code:
For i = 1 To 20
If (InStr(1, Range("E" & i).Value, "Valid", vbTextCompare)) And (Range("D" & i).Value >= 10) Then
...
End if
Next
My question is if there's a way to declare as following:
Code:
Dim ValidVar as range
Dim ValidVal as range
set ValidVar = Range("E")
set ValidVal = Range("D")
For i = 1 To 20
If (InStr(1, (ValidVar & i).Value, "Valid", vbTextCompare)) And (ValidVal & i).Value >= 10) Then
...
End if
Next
I have tried any combination i could think of but i always get compilation or variables errors
Any ideas?
Thanks!!!!!