楼主加密了vba,我按照楼主表格把vba自己弄出来了 utDjN"
Private Sub CB1_Click() hkhk,bhI
Dim Fst1, Fst2, FRi, Fsi As Double ogrh"
Fst1 = Sheet1.Cells(2, 21).Value Fuuy_+p@G
n1 = Sheet1.Cells(4, 1).Value RZ#~^5DiO
FRi = 0 18xT2f
Fsi = 0 0$~zeG"
flag = 1 A*r6
While flag = 1 r#xq 8H=_m
FRi = 0 /d\#|[S
Fsi = 0 I#m0n%-[
For i = 1 To n1 _RHB ^y;-
FRi = FRi + Sheet1.Cells(5 + i, 18).Value gh{Z=_
If i = 1 Then Xj^Hy"HC^~
Fsi = Fsi + Sheet1.Cells(5 + i, 19).Value - Sheet1.Cells(5 + i, 20).Value CPto?=*A
ElseIf i = n1 Then @6N$!Q?
Fsi = Fsi + Sheet1.Cells(5 + i, 19).Value + Sheet1.Cells(4 + i, 20).Value * Sheet1.Cells(5 + i, 17).Value 5A~lu4-q
Else y)B>g/Hoh
Fsi = Fsi + Sheet1.Cells(5 + i, 19).Value + Sheet1.Cells(4 + i, 20).Value * Sheet1.Cells(5 + i, 17).Value - Sheet1.Cells(5 + i, 20).Value ph;ds+b
End If LR5X=&k
Next CE'd`_;HLn
Fst2 = FRi / Fsi <^APq8>
If Abs(Fst2 - Fst1) < 0.0000000001 Then +l "z
flag = 0 wInJ!1
Fst1 = Fst2 }?0At<(d
Sheet1.Cells(2, 21).Value = Fst1 Gidh7x
Else X<OOgC
Fst1 = Fst2 1+f>tv
Sheet1.Cells(2, 21).Value = Fst1 E9]/sFA-]
End If .D~ZE94@
Wend aOj(=s
End Sub