Hi everyone!!
The following code had been working;
But when I changed the range in the red section to the following;
It didn't work; no errors! Any ideas?
TIA
The following code had been working;
Code:
Sub Prodigal()Dim x As Range
If IsEmpty(Sheets("Watched").Range("I2")) = True Then
Sheets("Watched").Range("I2") = "X"
Else
[COLOR=#ff0000] If IsEmpty(Sheets("Watched").Range("I2")) = False Then[/COLOR]
[COLOR=#ff0000] Set x = Sheets("Watched").Range("I2:I26").Find("X", LookIn:=xlValues)[/COLOR]
[COLOR=#ff0000] If x.Address <> "$I$26" Then[/COLOR]
[COLOR=#ff0000] x.Offset(7, 0) = "X"[/COLOR]
[COLOR=#ff0000]ElseIf x.Address = "$I$26" Then[/COLOR]
MsgBox "Time to change the range!"
End If
End If
End If
End Sub
But when I changed the range in the red section to the following;
Code:
Sub Prodigal()Dim x As Range
If IsEmpty(Sheets("Watched").Range("I2")) = True Then
Sheets("Watched").Range("I2") = "X"
Else
[COLOR=#ff0000] If IsEmpty(Sheets("Watched").Range("I2")) = False Then[/COLOR]
[COLOR=#ff0000] Set x = Sheets("Watched").Range("I2:I500").Find("X", LookIn:=xlValues)[/COLOR]
[COLOR=#ff0000] If x.Address <> "$I$500" Then[/COLOR]
[COLOR=#ff0000] x.Offset(7, 0) = "X"[/COLOR]
[COLOR=#ff0000]ElseIf x.Address = "$I$500" Then[/COLOR]
MsgBox "Time to change the range!"
End If
End If
End If
End Sub
It didn't work; no errors! Any ideas?
TIA