LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Select Case organization help

Alicia,
I'm with Otto on this, but may be you something like this ...
- Assuming they can select from none to all of the options, you can use the
bits of a long to store those selected, provided there are less than 32
options

dim OptionsChosen as long

If opt1.value=true then OptionsChosen =OptionsChosen or 1
If opt2.value=true then OptionsChosen =OptionsChosen or 2
If opt3.value=true then OptionsChosen =OptionsChosen or 4

and you check if, say opt3 was selected with :
If OptionsChosen and 4=4 then ... whatever

- Or you could use an array
Dim Options(1 to 3) as boolean

options(1)=opt1.value
options(2)=opt2.value
etc...

NickHK

"Alicia" wrote in message
...
Oh helpful ones,

I need help organizing the Select Case I'm trying to build. It's
overwhelming me!

I am trying to have rates for Medical and Dental insurance self-populate
when you choose the options. So, A2 would be Medical rate for employee on
row 2 and B2 would be the Dental rate for EE on row 2.

Here are the various options:
MEDICAL:
Employee can choose:
Option 1, Option 2 or Option 3.

EE, EE/SP, EE/CH or Family (EE/SP/CH)

Employee is:

Salary, Commission/PT or GLR (different rates)

We "X" the box for what the employee has chosen (Options and coverage)

which
seems to me is a string. So that makes strOpt and strDep. How do I

declare
properly so that if there's an X in the Option 1 box that strOpt is = 1,
Option 2 makes strOpt = 2, etc.

Same thing with strDep (1, 2, 3 or 4). Is String the right choice?

If the EE is GLR, Salary, Commission and PT don't matter. However, if

they
aren't GLR, then Salary and Commission or PT have different rates

I have a separate sheet with named ranges (Opt1, Opt2, Opt 3 and Den) and
each one has the Dep status on the right column with the Sal, Comm/PT or

GLR
heading across.

I think I could build this with a whole bunch of If..then.. statements but
Select Case seems to be the way to go. I'm just having a hard time

wrapping
my head around it.

The last question is where do I put it so the rates pop up at the right
time. Is this an OnExit procedure from a cell?

I usually use VLookup but I think this is too complicated for a formula.
Any and all suggestions are welcome! If you can come up with a formula,
please do!

Let me know if you need more info.

Thanks,
Alicia




 
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
Case without Select Case error problem Ayo Excel Discussion (Misc queries) 2 May 16th 08 03:48 PM
Select Case organization help Otto Moehrbach Excel Programming 0 December 8th 06 01:33 AM
End Select without Select Case, Block If without End If errors Atreides Excel Programming 12 November 17th 06 05:10 PM
Case Select Bill Excel Programming 10 January 8th 05 05:02 PM


All times are GMT +1. The time now is 12:19 PM.

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

About Us

"It's about Microsoft Excel"