Hi!
flinx war wohl schneller.
Ich habe keine Tabelle angegeben. Es wird immer das aktive Blatt verwendet.
Der Code ist glaube ich selbsterklärend.
Sub Sortieren()
Dim intSourceRow As Integer
Dim intSourceCol As Integer
Dim intDestRow As Integer
Dim intDestCol As Integer
Dim intLoopCounter As Integer
intSourceRow = 3
intSourceCol = 1
intDestRow = 3
intDestCol = 9
For intLoopCounter = 1 To 3
Do
Cells(intDestRow, intDestCol) = Cells(intSourceRow, intSourceCol)
intDestRow = intDestRow + 1
intSourceCol = intSourceCol + 4
Cells(intDestRow, intDestCol) = Cells(intSourceRow, intSourceCol)
intDestRow = intDestRow + 1
intSourceRow = intSourceRow + 1
Cells(intDestRow, intDestCol) = Cells(intSourceRow, intSourceCol)
intDestRow = intDestRow + 1
intSourceCol = intSourceCol - 4
Cells(intDestRow, intDestCol) = Cells(intSourceRow, intSourceCol)
intDestRow = intDestRow + 1
intSourceRow = intSourceRow + 1
Loop Until Cells(intSourceRow, intSourceCol) = ""
intSourceRow = 3
intDestRow = 3
intSourceCol = intSourceCol + 1
intDestCol = intDestCol + 1
Next intLoopCounter
End Sub
mfg
WB
|