End Function
Sub S_figyri() ' ' S_figyri Макрос ' ' Сочетание клавиш: Ctrl+s ' Range("A1").Select ActiveCell.FormulaR1C1 = "Число разбиений" Range("A2").Select ActiveCell.FormulaR1C1 = "N" Range("A3").Select ActiveCell.FormulaR1C1 = "n1" Range("A4").Select ActiveCell.FormulaR1C1 = "n2" Range("A5").Select ActiveCell.FormulaR1C1 = "n3" Range("A3").Select ActiveCell.FormulaR1C1 = Str(n(1)) Range("A4").Select ActiveCell.FormulaR1C1 = Str(n(2)) Range("A5").Select ActiveCell.FormulaR1C1 = Str(n(3)) Range("A6").Select Range("B3").Select ActiveCell.FormulaR1C1 = Str(s(1, 1)) Range("C3").Select ActiveCell.FormulaR1C1 = Str(s(1, 2)) Range("d3").Select ActiveCell.FormulaR1C1 = Str(s(1, 3)) Range("B4").Select ActiveCell.FormulaR1C1 = Str(s(2, 1)) Range("C4").Select ActiveCell.FormulaR1C1 = Str(s(2, 2)) Range("d4").Select ActiveCell.FormulaR1C1 = Str(s(2, 3)) Range("B5").Select ActiveCell.FormulaR1C1 = Str(s(3, 1)) Range("C5").Select ActiveCell.FormulaR1C1 = Str(s(3, 2)) Range("d5").Select ActiveCell.FormulaR1C1 = Str(s(3, 3)) Columns("A:A").ColumnWidth = 16.14 Range("A1:A5").Select With Selection .HorizontalAlignment = xlCenter .VerticalAlignment = xlBottom .WrapText = False .Orientation = 0 .AddIndent = False .IndentLevel = 0 .ShrinkToFit = False .ReadingOrder = xlContext .MergeCells = False End With Range("B1:D1").Select With Selection .HorizontalAlignment = xlCenter .VerticalAlignment = xlBottom .WrapText = False .Orientation = 0 .AddIndent = False .IndentLevel = 0 .ShrinkToFit = False .ReadingOrder = xlContext .MergeCells = False End With Selection.Merge ActiveCell.FormulaR1C1 = "" Range("B15").Select ActiveCell.FormulaR1C1 = "" Range("B1:D1").Select ActiveCell.FormulaR1C1 = "Результат" Range("B2").Select ActiveCell.FormulaR1C1 = "Метод прямоугольников" Range("C2").Select ActiveCell.FormulaR1C1 = "Метод трапеции" Range("D2").Select ActiveCell.FormulaR1C1 = "Метод Симпсона" Cells.Select With Selection .HorizontalAlignment = xlCenter .VerticalAlignment = xlCenter .WrapText = True .Orientation = 0 .AddIndent = False .IndentLevel = 0 .ShrinkToFit = False .ReadingOrder = xlContext End With Range("D6").Select Columns("B:B").EntireColumn.AutoFit Columns("B:B").ColumnWidth = 11.57 Columns("C:C").ColumnWidth = 10.86 Columns("D:D").ColumnWidth = 11.14 Range("A1:D5").Select Selection.Borders(xlDiagonalDown).LineStyle = xlNone Selection.Borders(xlDiagonalUp).LineStyle = xlNone With Selection.Borders(xlEdgeLeft) .LineStyle = xlContinuous .ColorIndex = 0 .TintAndShade = 0 .Weight = xlThin End With With Selection.Borders(xlEdgeTop) .LineStyle = xlContinuous .ColorIndex = 0 .TintAndShade = 0 .Weight = xlThin End With With Selection.Borders(xlEdgeBottom) .LineStyle = xlContinuous .ColorIndex = 0 .TintAndShade = 0 .Weight = xlThin End With With Selection.Borders(xlEdgeRight) .LineStyle = xlContinuous .ColorIndex = 0 .TintAndShade = 0 .Weight = xlThin End With With Selection.Borders(xlInsideVertical) .LineStyle = xlContinuous .ColorIndex = 0 .TintAndShade = 0 .Weight = xlThin End With With Selection.Borders(xlInsideHorizontal) .LineStyle = xlContinuous .ColorIndex = 0 .TintAndShade = 0 .Weight = xlThin End With
|