515
Private Sub CommandButton1_Click()
Range("F2").Select '! # !
ActiveCell.Formula1C1 = Date '! #
k = 0 '=# # !
For i = 5 To 70 'D !
' ! – 65
If Cells(i, 1).Value <> 0 Then '$ ! !
k = k + 1 '$ !
'! # ! ( 5,7-10)
Cells(, 5).Formula1C1 = "=5(RC[-3],RC[-2],RC[-1])"
Cells(i, 7).FormulaR1C1 = "=RC[-5]*RC[-1]"
Cells(i, 8).FormulaR1C1 = "=RC[-5]*RC[-2]"
Cells(i, 9).FormulaR1C1 = "=RC[-5]*RC[-3]"
Cells(, 10).Formula1C1 = "=5(RC[-3],RC[-2],RC[-1])"
End If
Next i
'$
Cells(k + 5, 1).Formula = "':"
Cells(k + 5, 2).FormulaR1C1 = "=Sum(R5C2:R[-1]C2)"
Cells(k + 5, 3).FormulaR1C1 = "=Sum(R5C3:R[-1]C3)"
Cells(k + 5, 4).FormulaR1C1 = "=Sum(R5C4:R[-1]C4)"
Cells(k + 5, 5).FormulaR1C1 = "=Sum(R5C5:R[-1]C5)"
Cells(k + 5, 7).FormulaR1C1 = "=Sum(R5C7:R[-1]C7)"
Cells(k + 5, 8).FormulaR1C1 = "=Sum(R5C8:R[-1]C8)"
Cells(k + 5, 9).Formula1C1 = "=Sum(R5C9:R[-1]C9)"
Cells(k + 5, 10).Formula1C1 = "=Sum(R5C10:R[-1]C10)"
Cells(k + 5, 11).Formula1C1 = "=(RC[-1],0.3)"
Cells(k + 5, 11).NumberFormat = "0.00"
'!
Range(Cells(5, 2), Cells(k + 5, 5)).Select '&
Selection.Interior.ColorIndex = 35 '
Range(Cells(5, 7), Cells(k + 5, 10)).Select '*
Selection.Interior.ColorIndex = 24 '
'! ! %
With Range(Cells(k + 5, 1), Cells(k + 5, 11)).Font
.Name = "Times New Roman"
.Size = 12