Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Using "case" code in Excel
I have the following problem. Cell J2 contains a drop-down menu of week
days. I am trying to use VBA to check the text in cell J2, and then run a macro that matches the week day. The code follows, but it doesn't seem to work. Any suggestions? Sub selectthecase() Dim r As Range Set r = Range("J2") Select Case r Case Is = "MONDAY" Call MondayMacro Case Is = "TUESDAY" Call TuesdayMacro Case Is = "WEDNESDAY" Call WednesdayMacro Case Is = "THURSDAY" Call ThursdayMacro Case Is = "FRIDAY" Call FridayMacro Case Is = "SATURDAY" Call SaturdayMacro End Select End Sub -- Howard |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
lower case letter "i" always converts to upper case | Excel Discussion (Misc queries) | |||
Converting "uppercase" string data to "lower case" in CSV file | Excel Discussion (Misc queries) | |||
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell | Excel Discussion (Misc queries) | |||
how do I count only lower case "x" and exclude upper case "X" | Excel Worksheet Functions | |||
Fix Code: Select Case and "Contains" selection | Excel Programming |