enfantter
09-26-2011, 05:22 AM
Hi all,
I have a loop i only want to run a specific number of times - is this possible ?
For i = 1 To 5
If Sheets("Input").Cells(6, 9 + i).Value = "-" Then
countdays = countdays + 1
End If
Next i
I only want to run this loop until countdays = 3 (example - alternatively some reference cell). I might have to use a do until loop, but I am not too familiar with that.
The thing is I want to record the date i up with. Dates are in row 2:
settledate = Sheets("Input").Cells(2, 9 + i).Value
Let me know if this is not clear enough.
I have a loop i only want to run a specific number of times - is this possible ?
For i = 1 To 5
If Sheets("Input").Cells(6, 9 + i).Value = "-" Then
countdays = countdays + 1
End If
Next i
I only want to run this loop until countdays = 3 (example - alternatively some reference cell). I might have to use a do until loop, but I am not too familiar with that.
The thing is I want to record the date i up with. Dates are in row 2:
settledate = Sheets("Input").Cells(2, 9 + i).Value
Let me know if this is not clear enough.