楼主加密了vba,我按照楼主表格把vba自己弄出来了
zZS>+O
Private Sub CB1_Click() "it`X
B.
Dim Fst1, Fst2, FRi, Fsi As Double UwvGr h
Fst1 = Sheet1.Cells(2, 21).Value *##QXyyg
n1 = Sheet1.Cells(4, 1).Value *C[4 (DmB
FRi = 0 k^L#,:\&V
Fsi = 0 ]b5%?^Z#
flag = 1 ,+swH;=7#r
While flag = 1 -6.i\
B
FRi = 0 WsG"x>1n
Fsi = 0 Fr938q6^-
For i = 1 To n1 *93l${'
FRi = FRi + Sheet1.Cells(5 + i, 18).Value &<\4q
If i = 1 Then t?pIE cl
Fsi = Fsi + Sheet1.Cells(5 + i, 19).Value - Sheet1.Cells(5 + i, 20).Value Z1XUYe62
ElseIf i = n1 Then R !:eYoQ
Fsi = Fsi + Sheet1.Cells(5 + i, 19).Value + Sheet1.Cells(4 + i, 20).Value * Sheet1.Cells(5 + i, 17).Value LC~CPV'F
Else ^TuP=q5?
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 44<9zHK
End If }Rf}NWU)|
Next ,I9][_
Fst2 = FRi / Fsi Qivf|H619
If Abs(Fst2 - Fst1) < 0.0000000001 Then <DA{\'jJ
flag = 0 1R^XWAb
Fst1 = Fst2 nsM>% +o
Sheet1.Cells(2, 21).Value = Fst1 vWPM:1A
Else 'Qp&,xK
Fst1 = Fst2 IN]`lJ
Sheet1.Cells(2, 21).Value = Fst1 A &X
End If uOivnJ?
Wend dXf]G6
End Sub