T The Inspector Jun 22, 2009 #1 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.
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.
B Brad Jun 23, 2009 #3 Sub SelectSheet() If ActiveCell.Value = MyValue Then Sheets("MyValue").Select Else Sheets("NotMyValue").Select End If End Sub Hope this helps.
Sub SelectSheet() If ActiveCell.Value = MyValue Then Sheets("MyValue").Select Else Sheets("NotMyValue").Select End If End Sub Hope this helps.
P Patrick Molloy Jun 23, 2009 #4 do you mean If ActiveCell.Value = "MyValue" Then otherwise MyValue becomes a variable, defaulting to null and the IF condition will always be False
do you mean If ActiveCell.Value = "MyValue" Then otherwise MyValue becomes a variable, defaulting to null and the IF condition will always be False
T The Inspector Jun 26, 2009 #5 Thanks guys Patrick Molloy said: do you mean If ActiveCell.Value = "MyValue" Then otherwise MyValue becomes a variable, defaulting to null and the IF condition will always be False Click to expand...
Thanks guys Patrick Molloy said: do you mean If ActiveCell.Value = "MyValue" Then otherwise MyValue becomes a variable, defaulting to null and the IF condition will always be False Click to expand...