View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Peter Ostermann[_3_] Peter Ostermann[_3_] is offline
external usenet poster
 
Posts: 37
Default Interesting performance "black hole"

Hi, Vic,

We won't be able to help debug your code if you don't show us your code.


No prob. Here is my simple code:

While Ako_Liste.Cells(I, 1) < "" Or Ako_Liste.Cells(I, 3) < ""
If Trim(Ako_Liste.Cells(I, 10)) < AKO_Ref Then
Else
If Ako_Kd_Auswahl.Cells(3, 2) < "" And Ako_Kd_Auswahl.Cells(3,
4) < "" Then
Else
Ako_Kd_Auswahl.Cells(3, 2) = AKO_Ref
Ako_Kd_Auswahl.Cells(3, 4) = Trim(Ako_Liste.Cells(I, 17))
End If
Ako_Kd_Auswahl.Cells(II, 1) = Trim(Ako_Liste.Cells(I, 4))
Ako_Kd_Auswahl.Cells(II, 2) = Trim(Ako_Liste.Cells(I, 5))
Ako_Kd_Auswahl.Cells(II, 3) = Trim(Ako_Liste.Cells(I, 6)) & ", "
_
& Trim(Ako_Liste.Cells(I, 7))

Dat_Feld = Trim(Ako_Liste.Cells(I, 8))
If Len(Dat_Feld) < 10 _
Then
Ako_Kd_Auswahl.Cells(II, 4) = "0000.00.00"
Else
Ako_Kd_Auswahl.Cells(II, 4) = Mid(Dat_Feld, 7, 4) & _
Mid(Dat_Feld, 3, 4) & _
Mid(Dat_Feld, 1, 2)
End If
Ako_Kd_Auswahl.Cells(II, 5) = Trim(Ako_Liste.Cells(I, 9))
II = II + 1
End If
I = I + 1
Wend

Having said that, I would suggest you look at the help files (and the
examples) for the Find and FindNext methods. It's a bit trickier to code
than a simple loop, but if done properly, your first (and subsequent) runs
should take less than 0.1 seconds.


Sounds good. I am eager to learn a new methode and
will study the "Find" function. In the meantime - do you have
a short example of that code? Must not really fit into my
routine.

Greetings
Peter