Nader
04-04-2008, 07:38 AM
I know there are four different syntaxes of Do...Loop
1- Do While condition [statements] Loop
2- Do [statements] Loop While condition
3- Do Until condition [statements] Loop
4- Do [statements] Loop Until condition
I only know to dela with the number 3
RowCount = 1
Do Until Cells(RowCount, 1).Value = 5
RowCount = RowCount + 1
Loop
Cells(RowCount, 1) = 10
in this code the loop will show error if there isn't 5 number in the column 1 and if ther is a 5 will continue.
May somone help me to understand other loop(1,2,4)
1- Do While condition [statements] Loop
2- Do [statements] Loop While condition
3- Do Until condition [statements] Loop
4- Do [statements] Loop Until condition
I only know to dela with the number 3
RowCount = 1
Do Until Cells(RowCount, 1).Value = 5
RowCount = RowCount + 1
Loop
Cells(RowCount, 1) = 10
in this code the loop will show error if there isn't 5 number in the column 1 and if ther is a 5 will continue.
May somone help me to understand other loop(1,2,4)