integer equal value of another integer

steve_bris

Registered User.
Local time
Today, 19:25
Joined
Mar 22, 2005
Messages
30
Hi.

I am trying to get intSus be equal to the value of intDown in the following code and I don't know why it won't pass the value on .

Any help would be greatly appreciated :)

Thanks
Steve


Dim intDown as integer
Dim intSus as integer
intDown = 1
intSus = 1
Do
Sheets("Sheet3").Select
If Range("A" & intDown).Value = Name1 Then
intSus = intDown '-------- this line doesn't work
Else
intDown = intDown + 1
End If​
Loop Until Range("A" & intDown).Value = Name1
 
is the condition in your IF statment working properly?
do Range("A" & intDown).Value and Name1 contain EXACTLY the same values (considering also blank spaces) when IF Statment = True?


Filo65
 
What is Name1?

If it's a variable, can you include the code where you dimension it.
If it's a string, you should delimit it with quotes i.e. "Name1".
If it's a named range then you should specify this i.e. Range("Name1")
 
Please post the rest of your function. I wish to see how you're connecting to your excel file.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom