Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Stendahl,
Try: 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 End If Loop End If --- Regards, Norman "stendahl_jones" wrote in message ... 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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|