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: 3
Default Using Select Case Statements

With Excel 2002

I have a spreadsheet that makes extensive use of nested IF functions in
formulas. The spreadsheet has 15 cells for possible user input and 34 cells
with formulas that calculate results based on the 15 input cells. Eight of
the input cells do not require any input. Of the remaining 7 input cells,
users have the input options listed below. Unfortunately a recent worksheet
modification request has pushed the length of the longest formula beyond
Excel's limit for the number of characters in a formula and I'm
investigating a VBA solution.

My VBA experience is predominantly in Word, not Excel. I'm thinking a VBA
solution will involve one or more Select Case statements to identify which
input option was used and specify the appropriate formulas for the 34 cells
requiring calculations. I imagine I'll need to identify every possible case
that each of the options below is capable of producing, plus the cases that
result if users input data in the 8 non-required input cells.

It occurs to me that an alternative solution might be to continue using the
formulas in the worksheet that work, and use a Select Case statement only
for the new options required by the new worksheet modification request. I've
never used a Select Case statement in a macro and I'm looking for any advice
or related examples that might shed some light on how to proceed. Thanks.

Option 1
Enter a number in A5, B5, or C5
And
Enter a number in E5 or E6

i.e., A5, E5 = True

Option 2
Same as Case 1
And
Enter a number in G5

Option 3
Enter a number in A5, B5, or C5
And
Enter a number in I5

Option 4
Same as Case 3
And
Enter a number in G5

Option 5
Enter a number in E5 or E6
And
Enter a number in I5

Option 6
Same as Case 5
And
Enter a number in G5


 
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
IF Statements to Select Case??? Walter Excel Discussion (Misc queries) 2 December 2nd 09 08:00 PM
Case without Select Case error problem Ayo Excel Discussion (Misc queries) 2 May 16th 08 03:48 PM
Case Statements in Excel 2003 Alex Excel Discussion (Misc queries) 3 April 3rd 08 10:34 PM
Limits on Case Statements Todd Huttenstine Excel Programming 4 April 14th 04 08:32 PM
Case Statements Todd Huttenstine Excel Programming 2 April 14th 04 04:35 PM


All times are GMT +1. The time now is 09:51 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"