Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
check out this structu
Sub demo() For Each c In Selection If c.Value < 100 Then Else msbgox ("time to do something") End If Next End Sub if the value is less than 100 we do absolutely nothing exept move on to the next c -- Gary''s Student gsnu200707 "IanKR" wrote: 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Straight line depreciation | Excel Worksheet Functions | |||
Straight Line is not straight | Excel Discussion (Misc queries) | |||
straight line graph, really straight line.. | Excel Discussion (Misc queries) | |||
best fit straight line | Charts and Charting in Excel | |||
I want a straight answer | Excel Worksheet Functions |