Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
What is i ? Is that always 0...Also you have not mentioned the condition to
end the loop. Try the below and view the result in immediate window.. Sub Macro_Increment() Dim i, j, k i = 0: j = 0: k = 0 Do If k = 4 Then j = j + 1: k = 0 Debug.Print i & "," & j & "," & k k = k + 1 Loop Until j = 10 End Sub If this post helps click Yes --------------- Jacob Skaria "Harish" wrote: hi, I am looking for a formula that would give me a for loop. you can also give me a code in VB too.. This is what I am looking for in the for loop. i=0, j=0, k=0 i=0, j=0, k=1 i=0, j=0, k=2 i=0, j=0, k=3 i=0, j=1, k=0 i=0, j=1, k=1 i=0, j=1, k=2 i=0, j=1, k=3 and so on..... any ideas? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
returning back to loop check condition without completing the loop | Excel Programming | |||
Loop to Filter, Name Sheets. If Blank, Exit Loop | Excel Programming | |||
(Complex) Loop within loop to create worksheets | Excel Programming | |||
Advancing outer Loop Based on criteria of inner loop | Excel Programming | |||
Problem adding charts using Do-Loop Until loop | Excel Programming |