, VBA Excel. . , Excel.
. , .
, , . . . , .
. , , . . .
, . , , , , . , , .
, : ( ), ( , ) ( ). . , , . , . VBA.
, .
.
a, b, c.
p=(a+b+c)/ 2
s=p×(p a)×(p b)×(p c)
s=(s)
.
, Excel, . .
VBA InsertðModule. Modules Module2. Module2. Name Module2 ( ).
|
|
.
Function Geron(a As Double, b As Double, c As Double) _
As Double
'
Dim p As Double
Dim s As Double
p = (a + b + c) * 0.5
s = p * (p - a) * (p - b) * (p - c)
Geron = Sqr(s)
End Function
, .
. . . : , . 32 .
. VBA .
( , ). ( 4 ).
, Function, , End Function. .
' ; . VBA .
Dim <_> , , . ( 64), . .
. <> , , . , <_> : p, s, kw43,
As <_> , , , .
Double. 8 . Double Excel. .
( ) a, b, c As Double, Dim , .
Geron Double, . As Double , , , .
, , , :
Geron = <>
. VBA =. , , , .