ich würde gerne eine Makro schreiben, die von mehreren Seiten in einer Datei alle fettgedruckten Zeilen auf eine neue Seite kopiert und sie dann nach Datum sortiert.
Wäre das möglich? Und wenn ja, wie?
Danke!
Sub FetteKopierenUndSortieren()
Dim i As Long
Dim j As Long
j = 1
With Sheets(1)
For i = 1 To .Cells(65536, 1).End(xlUp).Row
If .Cells(i, 1).Font.Bold Then
Sheets(2).Cells(j, 1).Value = .Cells(i, 1).Value
j = j + 1
End If
Next i
End With
Sheets(2).Columns("A:A").Sort Key1:=Range("A1"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
End Sub
Sub FetteKopierenUndSortieren()
Dim i As Long
Dim j As Long
j = 1
With Sheets(1)
For i = 1 To .Cells(65536, 1).End(xlUp).Row
If .Cells(i, 1).Font.Bold Then
.Range(Cells(i, 1), Cells(i, 15)).Copy Destination:=Sheets(2).Cells(j, 1)
j = j + 1
End If
Next i
End With
With Sheets(2)
.Activate
.Columns("A:O").Sort Key1:=Range("A1"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
End With
End Sub