AW: kopieren, sortieren, addieren
13.03.2008 10:27:00
{mskro}
Nochmals Hallo,
hatte doch glatt die Berechnung vergessen.
Sub Export()
Sheets("Liste").Select
lz = Cells(Rows.Count, 1).End(xlUp).Row
Range(Cells(6, 1), Cells(lz, 8)).Copy
Sheets.Add.Name = "Details"
ActiveSheet.Paste
Application.CutCopyMode = False
Selection.Sort Key1:=Range("H1"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
lz = Cells(Rows.Count, 1).End(xlUp).Row
Cells(lz + 1, 1).Select
ActiveCell.FormulaR1C1 = "=SUM(R[-" & lz & "]C:R[-1]C)"
Selection.AutoFill Destination:=Range(Cells(lz + 1, 1), Cells(lz + 1, 8)), Type:= _
xlFillDefault
Range("A1").Select
End Sub
Gruß Manfred
Rückmeldung wäre nett!