楼主加密了vba,我按照楼主表格把vba自己弄出来了 90sM S]a
Private Sub CB1_Click() Mn>dI@/gM
Dim Fst1, Fst2, FRi, Fsi As Double HCHP15otfe
Fst1 = Sheet1.Cells(2, 21).Value MGc=TQ.
n1 = Sheet1.Cells(4, 1).Value n8[sR;r5f
FRi = 0 $DA0lY\
Fsi = 0 |rdG+>
flag = 1 @[=*w`1
While flag = 1 &-<"HW
FRi = 0 ;DC0LJ
Fsi = 0 Lj *FKP\{
For i = 1 To n1 au"HIyi?k
FRi = FRi + Sheet1.Cells(5 + i, 18).Value ol!o8M%Q
If i = 1 Then E=~H,~
Fsi = Fsi + Sheet1.Cells(5 + i, 19).Value - Sheet1.Cells(5 + i, 20).Value :m8ED[9b
ElseIf i = n1 Then dr~MyQ
Fsi = Fsi + Sheet1.Cells(5 + i, 19).Value + Sheet1.Cells(4 + i, 20).Value * Sheet1.Cells(5 + i, 17).Value ||`w MWq
Else
tyP-J4J
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 7b+OIZB
End If }S*6+4
Next bw%1*;n)
Fst2 = FRi / Fsi FPaj
p
If Abs(Fst2 - Fst1) < 0.0000000001 Then T 6QnCmB4
flag = 0 "x\3`Qk
Fst1 = Fst2 >]:R{1h
Sheet1.Cells(2, 21).Value = Fst1 lx$Y-Tb^F
Else :FG}k Y
Fst1 = Fst2 oge^2
Sheet1.Cells(2, 21).Value = Fst1 Hxb{bF
End If lUUq|Qr
Wend C>v
End Sub