Hallo VBA Gemeinde
Ich möchte gerne mehrere Spalten zusammenfassen und in eine Spalte verschiebe. Der Code sollte doch der gleiche sein wie der der einzelnen Zellen sein?
Cells(x,y) = Cells(x,y) & Cells(a,b)
Hier mein code:
a = 1
iSection = 1
For j = 1 To colMax
If Not Cells(1, j).Interior.ColorIndex = Worksheets(1).Cells(1, j + 1).Interior.ColorIndex Then
Do Until iSection = 3
For k = a To j
Range(Cells(2, k), Cells(iRowMax, k)).Select
If Range(Cells(2, k), Cells(iRowMax, k)) <> "" Then
Range(Cells(2, a), Cells(iRowMax, a)) = Range(Cells(2, a), Cells(iRowMax, a)) & Range(Cells(2, k), Cells(iRowMax, k))
End If
Next
a = j
iSection = iSection + 1
Loop
End If
Next
Mfg
Baptister
|