[b]Option Explicit
Sub Zusammenfassen()
Dim iColumn As Integer, iRow As Integer
Dim i As Integer, FirstRow As Integer
Dim aktSheetName As String, StrColumn As String
aktSheetName = ActiveSheet.Name
For i = Worksheets.Count To 1 Step -1
If Sheets(i).Name = "Änderung" Then
Application.DisplayAlerts = False
Sheets(i).Delete
Application.DisplayAlerts = True
Exit For
End If
Next
With Worksheets.Add
.Name = "Änderung"
End With
For iColumn = 1 To Sheets(aktSheetName).Range("IV1").End(xlToLeft).Column
StrColumn = Left(Cells(1, iColumn).Address(True, False), InStr(1, Cells(1, iColumn).Address(True, False), "$") - 1)
For iRow = 2 To Sheets(aktSheetName).Range(StrColumn & "65536").End(xlUp).Row
FirstRow = Sheets("Änderung").Range("A65536").End(xlUp).Offset(1, 0).Row
Sheets("Änderung").Cells(FirstRow, 1) = _
Sheets(aktSheetName).Cells(1, iColumn)
Sheets("Änderung").Cells(FirstRow, 2) = _
Sheets(aktSheetName).Cells(iRow, iColumn)
Next
Next
End Sub[/b]
Makro automatisch aktualisieren
pc-makro 07.02.2007 - 191 Hits - 1 Antwort
Leere Zeilen automatisch loeschen
dvdh 30.05.2007 - 215 Hits - 3 Antworten
mehrere Zeilen in Excel einfügen
Arnsen1 07.08.2007 - 119 Hits - 1 Antwort