How do I, in VBA, test to see if a cell has a specific word in it
do you mean
If ActiveCell.Value = "MyValue" Then
otherwise MyValue becomes a variable, defaulting to null and the IF
condition will always be False
"Brad" wrote in message
...
Sub SelectSheet()
If ActiveCell.Value = MyValue Then
Sheets("MyValue").Select
Else
Sheets("NotMyValue").Select
End If
End Sub
Hope this helps.
"The Inspector" wrote:
I need to know what text is in an cell. The cell will be used to
determine
what sheet will be edited with the macro.
|