Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.setup
|
|||
|
|||
Excel Question
I have a spreadsheet that I am working on where I define some of the
information in an area on the excel sheet (For example I have 1/2, 1, 2, 2/4, 3, 4, 4/5, 5, 5/6. These fields are used for a drop down list on the same excel sheet and allow them to pick one of these numbers within that cell. I then take the information from that cell and input it on a cartoon to display in an area on the cartoon based on what number that they are using for the drop down list. For Example 2 would display in 2 and 2/4 would display in 4. Unfortunately if I say 2 it displays in 2 if I say 2/4 it displays in 2 and 4 and I only want it to display in 4 not 2. Below is some code that I am trying to use to allow that to happen but I think that I am missing something. Can you help? Dim sReturn As String Select Case vsKettle Case "2" sReturn = "2" Case "2/4" sReturn = "4" End Select |
#2
Posted to microsoft.public.excel.setup
|
|||
|
|||
Excel Question
Try adding additional variables in your code for each number. For example:
Dim sReturn As String Dim a As Integer Dim b As String Dim C As Integer a = 2 b = "2/4" c = 4 Select Case vsKettle Case a sReturn = "2" Case b sReturn = "2/4" Case c sReturn = "4" End Select "Mindie" wrote: I have a spreadsheet that I am working on where I define some of the information in an area on the excel sheet (For example I have 1/2, 1, 2, 2/4, 3, 4, 4/5, 5, 5/6. These fields are used for a drop down list on the same excel sheet and allow them to pick one of these numbers within that cell. I then take the information from that cell and input it on a cartoon to display in an area on the cartoon based on what number that they are using for the drop down list. For Example 2 would display in 2 and 2/4 would display in 4. Unfortunately if I say 2 it displays in 2 if I say 2/4 it displays in 2 and 4 and I only want it to display in 4 not 2. Below is some code that I am trying to use to allow that to happen but I think that I am missing something. Can you help? Dim sReturn As String Select Case vsKettle Case "2" sReturn = "2" Case "2/4" sReturn = "4" End Select |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel files in separate program windows | Excel Discussion (Misc queries) | |||
excel novice question on filling in missing fields/cells | Excel Discussion (Misc queries) | |||
TRYING TO SET UP EXCEL SPREADSHEET ON MY COMPUTER | New Users to Excel | |||
Hints And Tips For New Posters In The Excel Newsgroups | Excel Worksheet Functions | |||
Statistical Excel Function Question within Excel 2000... | Excel Worksheet Functions |