S
stendahl_jones
I had a loop that worked just fine. Then I added an extra IF-Else and the
computer started complianing that I had loop without do, which is untrue. Can
anyone see whats wrong with this loop?
If rng1 Is Nothing Then
MsgBox ("Datum (date) kan ej hittas!")
Else
i = 0
Do Until IsEmpty(rng1.Offset(i + 1, 0)) = True
If rng1.Offset(i + 1, 0).Text = startDatumArr(1) Then
strTeststartDatumAddress = rng1.Offset(i + 1, 0).Address
i = i + 1
Else
i = i + 1
If rng1.Offset(i + 1, 0).Text = slutDatumArr(1) Then
strTestslutDatumAddress = rng1.Offset(i + 1, 0).Address
Else: End If
Loop
End If
Thank you for your time.
computer started complianing that I had loop without do, which is untrue. Can
anyone see whats wrong with this loop?
If rng1 Is Nothing Then
MsgBox ("Datum (date) kan ej hittas!")
Else
i = 0
Do Until IsEmpty(rng1.Offset(i + 1, 0)) = True
If rng1.Offset(i + 1, 0).Text = startDatumArr(1) Then
strTeststartDatumAddress = rng1.Offset(i + 1, 0).Address
i = i + 1
Else
i = i + 1
If rng1.Offset(i + 1, 0).Text = slutDatumArr(1) Then
strTestslutDatumAddress = rng1.Offset(i + 1, 0).Address
Else: End If
Loop
End If
Thank you for your time.