楼主加密了vba,我按照楼主表格把vba自己弄出来了 ZS*PY,
Private Sub CB1_Click() A}Q6DHh26
Dim Fst1, Fst2, FRi, Fsi As Double lxIoP
Fst1 = Sheet1.Cells(2, 21).Value f3Zm_zxj
n1 = Sheet1.Cells(4, 1).Value c]SXcA;Pmv
FRi = 0 4PtRTb0<i3
Fsi = 0 z>rl7&[@
flag = 1 tI42]:z
While flag = 1 =P}ob eY
FRi = 0 {O ]^8#v^
Fsi = 0 $l05VZ
For i = 1 To n1 W rB:)Q(8=
FRi = FRi + Sheet1.Cells(5 + i, 18).Value $]v=2j
If i = 1 Then _Mi`]VSq9
Fsi = Fsi + Sheet1.Cells(5 + i, 19).Value - Sheet1.Cells(5 + i, 20).Value J?]wA1
ElseIf i = n1 Then [Yr}:B
<
Fsi = Fsi + Sheet1.Cells(5 + i, 19).Value + Sheet1.Cells(4 + i, 20).Value * Sheet1.Cells(5 + i, 17).Value I!FIV^}Z(
Else Wt|IKCx
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 ^O#>LbM"x
End If {z~n`ow
Next M3m!u[6|
Fst2 = FRi / Fsi AgEX,SPP
If Abs(Fst2 - Fst1) < 0.0000000001 Then !6Sr*a*5
flag = 0 5L6_W-n{
Fst1 = Fst2 ;L1Q"Hxh
Sheet1.Cells(2, 21).Value = Fst1 km@V|"ac
_
Else )k)HQcfjD
Fst1 = Fst2 I$.HG]
Sheet1.Cells(2, 21).Value = Fst1 r%`g` It
End If w$Zi'+&*
Wend #NU@7Q[4
End Sub