Schleife schneller machen
17.02.2016 19:59:13
Thomas
Matthias L hat mir netterweise mal ein Macro zur Verfügung gestellt was bisher auch klasse Dienste geleistet hat. Nur muss ich jetzt mit deutlich mehr Datensätze rechnen als vorher. Sieht jemand eine Chance wie man diese Schleife irgendwie schneller machen könnte?
besten dank schon mal im voraus
liebe grüsse thomas
https://www.herber.de/bbs/user/103653.xlsm
Sub tt()
' erstellt von Matthias L 28.01.2016 16:55:48
Dim x&, i&
With Tabelle1
For x = 5000 To 2 Step -1
If .Cells(x, 9) = "TF" Then
If .Cells(x, 5) .Cells(x, 6) Then
.Rows(x + 1).Insert Shift:=xlDown
.Cells(x + 1, 5) = .Cells(x, 6)
.Cells(x + 1, 6) = .Cells(x, 6)
.Cells(x, 6) = .Cells(x, 5)
.Cells(x + 1, 4) = .Cells(x, 4)
.Cells(x + 1, 7) = .Cells(x, 7)
.Cells(x + 1, 8) = .Cells(x, 8)
.Cells(x + 1, 9) = .Cells(x, 9)
End If
End If
Next
End With
End Sub