楼主加密了vba,我按照楼主表格把vba自己弄出来了 >E=a~ O
Private Sub CB1_Click() 0O4mA&&!oK
Dim Fst1, Fst2, FRi, Fsi As Double ^dD?riFAk
Fst1 = Sheet1.Cells(2, 21).Value ev
>9P
n1 = Sheet1.Cells(4, 1).Value >WX'oP(<
FRi = 0 l}/UriZ0
Fsi = 0 tH(#nx8
flag = 1 =^v Ub
While flag = 1 V=~dgy~@
FRi = 0 RUu'9#fq
Fsi = 0 c= uORt>
For i = 1 To n1 /p"R}&z
FRi = FRi + Sheet1.Cells(5 + i, 18).Value R FiR)G ,
If i = 1 Then p\\q[6
Fsi = Fsi + Sheet1.Cells(5 + i, 19).Value - Sheet1.Cells(5 + i, 20).Value 7RJW
ElseIf i = n1 Then 0in6z
Fsi = Fsi + Sheet1.Cells(5 + i, 19).Value + Sheet1.Cells(4 + i, 20).Value * Sheet1.Cells(5 + i, 17).Value |D:0BATRP
Else 6suc:rp";
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$]y5
End If Q pq0j^\
Next iSlVe~ef
Fst2 = FRi / Fsi UxtZBNn8
If Abs(Fst2 - Fst1) < 0.0000000001 Then +%v4Ci"%y
flag = 0 K%B i8d
Fst1 = Fst2 a mgex$
Sheet1.Cells(2, 21).Value = Fst1 S:s^si2/
Else -X
\vB
Fst1 = Fst2 ;@hP*7Lm
Sheet1.Cells(2, 21).Value = Fst1 xd<68%Cn
End If |0-L08DW
Wend dM$S|,H
End Sub