#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 245
Default For next

Sub test()

For x = 1 To 27

Select Case x

Case 4, 10, 17, 27
MsgBox x
Case Else
'do nada
End Select
Next x


End Sub


--
Steve

"Mike" wrote in message
...
Is there a way to write a for next statement for some set numbers.

For instance, I want to have a loop to run for x = 4, 10, 19, 27.

Thanks,
Mike.


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



All times are GMT +1. The time now is 02:51 PM.

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"