#1   Report Post  
Posted to microsoft.public.excel.setup
external usenet poster
 
Posts: 6
Default 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   Report Post  
Posted to microsoft.public.excel.setup
external usenet poster
 
Posts: 13
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel files in separate program windows Jason Dove Excel Discussion (Misc queries) 27 October 24th 08 07:58 PM
excel novice question on filling in missing fields/cells TimR Excel Discussion (Misc queries) 3 May 19th 06 11:10 AM
TRYING TO SET UP EXCEL SPREADSHEET ON MY COMPUTER MEGTOM New Users to Excel 5 October 27th 05 03:06 AM
Hints And Tips For New Posters In The Excel Newsgroups Gary Brown Excel Worksheet Functions 0 April 15th 05 05:47 PM
Statistical Excel Function Question within Excel 2000... Drew H Excel Worksheet Functions 3 October 31st 04 06:55 PM


All times are GMT +1. The time now is 01:13 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"