LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 280
Default when IF equals multiple values??

"Jose Rojas" wrote in message
...
Sub SF()
Dim i As Long
Select Case Sheets("Sheet1").Range("A1")
Case Is = 1
i = 1
Case Is 1
i = 2
End Select

'Hope It Works!!!

End Sub


Did you mean something like this?

Sub SF()
Dim i As Long
Select Case Sheets("Sheet1").Range("A1")
Case Is = 1, 3, 5, 8, 10, 12, 13, 15, 17, 20
i = 1
Case Else
i = 2
End Select

End Sub


--
Bob Kilmer



 
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
Multiple Criteria & Count if Equals 0 slf Excel Worksheet Functions 4 October 3rd 09 07:24 AM
insert row when sum of values equals 100 lloydyleg11 Excel Discussion (Misc queries) 4 April 30th 09 02:04 AM
insert row when sum of values equals 100 lloydyleg11 Excel Discussion (Misc queries) 1 April 23rd 09 08:20 AM
if a:a (range) equals january and c:c equals gas then add g:g ($) BCOz Excel Worksheet Functions 4 December 29th 05 07:40 PM
custom filter does not work when selecting 'equals' X AND 'equals' plindman Excel Discussion (Misc queries) 1 June 1st 05 11:29 PM


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