Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Perfect, thanks Jacob
"Jacob Skaria" wrote: Use SELECT/CASE as below.. Select Case Range("A1") Case "RED" 'Code for Red Case "BLUE" 'Code for Blue Case "GREEN" 'Code for green Case Else 'Code if else End Select If this post helps click Yes --------------- Jacob Skaria "Newbie" wrote: Hi, I am trying to run a routine based on the value in a cell, for example A1 might contain RED, BLUE or GREEN. In the VBA I would have x = Range("A1") .value goto x end RED: 'red routine here end BLUE: 'blue routine here end GREEN 'green routine here end ...but it doesn't work, any help much appreciated. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Assigning a Variable to an Expression that Includes a Variable andVBA Property | Excel Programming | |||
Nothing Keyword Destories Objects rather than just resetting the variable to an empty variable | Excel Programming | |||
why is it saying sheetcnt is "variable not defined" how to do a global variable to share over multiple functions in vba for excel? | Excel Worksheet Functions | |||
Run-time error '91': "Object variable or With block variable not set | Excel Programming | |||
Cells.Find error Object variable or With block variable not set | Excel Programming |