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: 97
Default Go straight to next value in a For... Next loop

Is there a way of going straight to the next value in a For / Next loop,
having tested the current value? I need to do something like this (for
example):

Dim c as Range
For each c in Selection.Cells
If c.Value < 100 Then
Goto Next c '<<<<< I know this is illegal, but it illustrates
what I want to do!
Else
{statements where c.Value = 100}
...
...
End If
Next c

I don't want to Exit For, I just want it to effectively ignore the current
instance of c and move onto the next. I've tried "Next c" but it generates a
compile error.

Thanks in advance.

Ian


 
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
Straight line depreciation Ian Excel Worksheet Functions 4 August 26th 09 05:47 PM
Straight Line is not straight klm Excel Discussion (Misc queries) 2 September 13th 07 07:19 PM
straight line graph, really straight line.. Jason Excel Discussion (Misc queries) 2 July 20th 06 10:08 PM
best fit straight line Priscilla Charts and Charting in Excel 1 May 17th 06 11:32 AM
I want a straight answer Terry Excel Worksheet Functions 5 January 26th 06 10:29 AM


All times are GMT +1. The time now is 06:36 AM.

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"