Hilfe Code beschleunigen
22.10.2020 19:07:37
Mani
Ich füge mit folgendem Code Daten in meine Tabelle :
Set wksQ = ThisWorkbook.Worksheets("Daten")
Set wksZ = ThisWorkbook.Worksheets("Neu")
Letzte1 = ThisWorkbook.Worksheets("Daten").Cells(Rows.Count, "A").End(xlUp).Row
Letzte2 = ThisWorkbook.Worksheets("Neu").Cells(Rows.Count, "A").End(xlUp).Row
For Q_x = 2 To Letzte1
If wksQ.Cells(Q_x, 7) = "x" Then
Artikel = wksQ.Cells(Q_x, 3)
Menge = wksQ.Cells(Q_x, 8)
Woche = wksQ.Cells(Q_x, 5)
For Z_X = 3 To Letzte2
If wksZ.Cells(Z_X, 3) = Artikel Then
MyRow = Z_X
For x = 7 To 143
If wksZ.Cells(3, x) = Woche Then
MyCol = x
If wksZ.Cells(MyRow, x) = "" Then
wksZ.Cells(MyRow, MyCol) = Menge
End If
End If
Next
End If
Next
End If
Next
Dies dauert allerdings bei 143 Spalten sehr lange.
Habt ihr eine Idee wie ich das ganze schneller gestalten kann ?
Viele Grüße
Der Manni