楼主加密了vba,我按照楼主表格把vba自己弄出来了 v-6"*EP
Private Sub CB1_Click() -1Y9-nn[m
Dim Fst1, Fst2, FRi, Fsi As Double Ke-Q>sm2Q
Fst1 = Sheet1.Cells(2, 21).Value YArNJ5z=
n1 = Sheet1.Cells(4, 1).Value ||v=in
FRi = 0 fr'M)ox1
Fsi = 0 >}QRMn|@H
flag = 1 51yIW*
While flag = 1 dDH+`;$.
FRi = 0 Li ,B,
Fsi = 0 zb9^ii$g
For i = 1 To n1 ZK5(_qW&i
FRi = FRi + Sheet1.Cells(5 + i, 18).Value 7t-j2 n`<
If i = 1 Then CG'NC\x5
Fsi = Fsi + Sheet1.Cells(5 + i, 19).Value - Sheet1.Cells(5 + i, 20).Value AoHA+>&U
ElseIf i = n1 Then Mr'}IX5
Fsi = Fsi + Sheet1.Cells(5 + i, 19).Value + Sheet1.Cells(4 + i, 20).Value * Sheet1.Cells(5 + i, 17).Value H e]1<tx
Else .d`+#1Ot(
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 !mFo:nQ)}
End If J5L P#o(V
Next <'A>7M~h?*
Fst2 = FRi / Fsi
?7-#iC`
If Abs(Fst2 - Fst1) < 0.0000000001 Then -oq!zi4:
flag = 0 GZT}aMMSJ
Fst1 = Fst2 \C.%S +u
Sheet1.Cells(2, 21).Value = Fst1 8>x.zO_.c>
Else o
D;
Fst1 = Fst2 /^96|
Sheet1.Cells(2, 21).Value = Fst1 Cus=UzL
End If ^|}C!t+
Wend Ab7hW(/
End Sub