Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 989
Default Between values

I am using Excel 97.

I have a workbook which has currently got over 400 worksheets in it, which
is not ideal and does have a tendency to crash periodically.

Each workbook has a unique number

Currently they range for 0024 - 6994

I have split the sheets into separate workbooks say 1-1000, 1001 - 1999 etc
and using an input box I am wanting to select a particular worksheet from one
of these books say for example 3327.

To differentiate between the workbooks I though a select case piece of code
might be useful but I am struggling the correct formula

I assume I need something on the lines of

Case is between 3000 and 4000 then

workbook("3000").activate

Can someone help with a solution, please.

Many thanks

--
Mark
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Between values

Sub Tester1()
Index = Int(Rnd() * 3000 + 1)
Select Case Index
Case 1 To 1000
MsgBox "1 to 1000" & " " & Index
Case 1001 To 2000
MsgBox "1001 to 2000" & " " & Index
Case Else
MsgBox "Above 2000" & " " & Index
End Select
End Sub

--
Regards,
Tom Ogilvy


"Mark" wrote in message
...
I am using Excel 97.

I have a workbook which has currently got over 400 worksheets in it, which
is not ideal and does have a tendency to crash periodically.

Each workbook has a unique number

Currently they range for 0024 - 6994

I have split the sheets into separate workbooks say 1-1000, 1001 - 1999

etc
and using an input box I am wanting to select a particular worksheet from

one
of these books say for example 3327.

To differentiate between the workbooks I though a select case piece of

code
might be useful but I am struggling the correct formula

I assume I need something on the lines of

Case is between 3000 and 4000 then

workbook("3000").activate

Can someone help with a solution, please.

Many thanks

--
Mark



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Between values

Mark,

Something like

Select Case myVal
Case 3000 To 4000: Workbooks("3000").Activate
End Select


--

HTH

RP
(remove nothere from the email address if mailing direct)


"Mark" wrote in message
...
I am using Excel 97.

I have a workbook which has currently got over 400 worksheets in it, which
is not ideal and does have a tendency to crash periodically.

Each workbook has a unique number

Currently they range for 0024 - 6994

I have split the sheets into separate workbooks say 1-1000, 1001 - 1999

etc
and using an input box I am wanting to select a particular worksheet from

one
of these books say for example 3327.

To differentiate between the workbooks I though a select case piece of

code
might be useful but I am struggling the correct formula

I assume I need something on the lines of

Case is between 3000 and 4000 then

workbook("3000").activate

Can someone help with a solution, please.

Many thanks

--
Mark



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 2007 doesnt show Y-axis values when the values are small. outback Charts and Charting in Excel 2 October 26th 08 01:37 AM
Exclude #N/A values and Return Numeric values to consecutive cells in Single Row Sam via OfficeKB.com Excel Worksheet Functions 5 February 9th 08 03:07 AM
Search/Filter to find values in another range based on two cell values Andy Excel Programming 2 April 29th 04 04:08 PM
How do I search thr'o column and put unique values in differnt sheet and sum corresponding values in test test Excel Programming 3 September 9th 03 08:53 PM
Predict Y-values on new X-values based on other actual X and Y values? NorTor Excel Programming 2 August 10th 03 03:08 PM


All times are GMT +1. The time now is 10:25 AM.

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"