Private Sub cmdMarkoStarten_Click()
Rows("1:1").RowHeight = 26.25
Range("1:4,6:6").Select
Selection.Delete Shift:=xlUp
Rows("2:2").Select
ActiveWindow.FreezePanes = True
Columns("F:F").Select
Selection.Replace What:="Sollst.", Replacement:="LV", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Selection.Replace What:="/", Replacement:=" / ", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Selection.Replace What:="No", Replacement:="LV", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Columns("A:A").Select
Selection.Insert Shift:=xlToRight
Selection.Insert Shift:=xlToRight
Selection.Insert Shift:=xlToRight
Range("C2").Select
ActiveCell.FormulaR1C1 = _
"=MID(RC[6],SEARCH(""LV"",RC[6],1)+3,SEARCH("" "",RC[6],SEARCH(""LV"",RC[6],1)+3)-(SEARCH(""LV"",RC[6],1)+4))"
Range("B2").Select
ActiveCell.FormulaR1C1 = _
"=MID(RC[7],SEARCH(""LV"",RC[7],1)+3,SEARCH("" "",RC[7],SEARCH(""LV"",RC[7],1)+3)-(SEARCH(""LV"",RC[7],1)+3))"
Range("A2").Select
ActiveCell.FormulaR1C1 = _
"=IF(MID(RC[8],SEARCH("" "",RC[8],SEARCH(""LV"",RC[8],1)+3)-1,1)="","",RC[2],RC[1])*1"
Range("A1").Select
ActiveCell.FormulaR1C1 = "LV"
Range("A2:C2").Select
Selection.AutoFill Destination:=Range("A2:C800"), Type:=xlFillDefault
Columns("A:A").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Columns("B:C").Select
Application.CutCopyMode = False
Selection.Delete Shift:=xlToLeft
Columns("A:A").ColumnWidth = 7.29
Range("H1:K1").Select
Selection.ClearContents
Range("H1").Select
ActiveCell.FormulaR1C1 = "CHF"
Range("I1").Select
ActiveCell.FormulaR1C1 = "EUR"
Range("J1").Select
ActiveCell.FormulaR1C1 = "BW EUR"
Range("K1").Select
ActiveCell.FormulaR1C1 = "Total"
Range("L1").Select
ActiveCell.FormulaR1C1 = "Anzahl Raten"
Range("H2").Select
Cells.Select
Range("C1").Activate
Selection.Sort Key1:=Range("A2"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Columns("H:H").Select
Selection.NumberFormat = "#,##0.00"
Range("H2").Select
ActiveCell.FormulaR1C1 = "=SUMIF(C[-7],RC[-7],C[-2])"
Columns("I:I").Select
Selection.NumberFormat = "#,##0.00"
Selection.ColumnWidth = 10
Range("I2").Select
ActiveCell.FormulaR1C1 = "=RC[-1]/1.5/1000"
Range("I2").Select
Selection.Copy
Columns("J:J").Select
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
Range("J2").Select
ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-9],Tabelle3!R1:R65536,3,0)"
Range("J3").Select
Range("K2").Select
ActiveCell.FormulaR1C1 = "=COUNTIF(C[-10],RC[-10])"
Columns("K:K").Select
Selection.NumberFormat = "0"
Range("L2").Select
ActiveCell.FormulaR1C1 = "=IF(RC[-11]=R[-1]C[-11],"" "",""xxx"")"
Columns("J:J").ColumnWidth = 9.86
Range("H2:L2").Select
Selection.AutoFill Destination:=Range("H2:L800"), Type:=xlFillDefault
Columns("H:L").Select
With Selection
.HorizontalAlignment = xlRight
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Range("A1:L1").Select
Range("L1").Activate
With Selection.Interior
.ColorIndex = 15
.Pattern = xlSolid
End With
Range("H7").Select
Sheets("Tabelle3").Select
Columns("B:U").Select
Selection.Delete Shift:=xlToLeft
Columns("C:DN").Select
Selection.Delete Shift:=xlToLeft
Range("C1").Select
ActiveCell.FormulaR1C1 = "BW EUR"
Range("C2").Select
ActiveCell.FormulaR1C1 = "=ROUND(RC[-1]/1.5/1000,0)"
Range("C2").Select
Selection.AutoFill Destination:=Range("C2:C3000"), Type:=xlFillDefault
Range("C2:C3000").Select
Sheets("Tabelle1").Select
End Sub