Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Pedro Gilbert   on Sep 29 In MS Office Category.

  
Question Answered By: Morris Hughes   on Sep 29

How about something more like
For j = 1 to 500
i = 440 + (j - 1) * 5
' do your thing...
Next

Doesn't seem to be quite what you want because j will run from 1 to 500,
while I will run from 440 to 2935, and you said you only need i to run
from 440 to 600, so I'm a little confused.

I agree with Doreen - you don't want two loops, just one, and then
calculate one value based on the other.

You can also try incrementing i at the same time  you increment j like
this:

i = 440
For j = 1 to 500
' do your thing...
i = i + 5 ' now increment i
Next

Maybe you can explain what you need to do a little more clearly?

Share: 

 

This Question has 2 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Nested For Loop Plz Help Or get search suggestion and latest updates.


Tagged: