excel - Advance to Next Item from Within a For-Next Loop -


i have for-next loop. within loop test several different criteria , if test fails, ready @ point skip remainder of code in loop , advance "next" item. way handle goto statement takes me line right before "next". i'd prefer not use goto statement, there way advance "next" item within for-next loop? tia!

for x = 1 10     test 1     if test 1 fails         goto line1     end if      test 2     if test 2 fails         goto line1     end if     .     .     .     if tests pass         add item array     end if line1:     next 

here's workaround lack of continue keyword:

for x = 1 10             test 1         if test 1 fails             exit         end if          test 2         if test 2 fails             exit         end if         .         .         .         if tests pass             add item array         end if     loop while false next 

Comments

Popular posts from this blog

javascript - jquery or ashx not working -

opencv - DataType<cv::detail::deriv_type>::depth what is it used for -

python 3.x - Mapping specific letters onto a list of words -