楼主加密了vba,我按照楼主表格把vba自己弄出来了 4:N*C7P
Private Sub CB1_Click() V(DY!f_%
Dim Fst1, Fst2, FRi, Fsi As Double 09G47YkSy1
Fst1 = Sheet1.Cells(2, 21).Value +FqE fY4j
n1 = Sheet1.Cells(4, 1).Value pe+h8
FRi = 0 7dACbqba
Fsi = 0 3+h3?
flag = 1 nR*'
3
While flag = 1 *`Vm ncv3
FRi = 0 /9I/^i~
Fsi = 0 \i%mokfbc
For i = 1 To n1 1hGj?L0m.
FRi = FRi + Sheet1.Cells(5 + i, 18).Value !%('8-x%
If i = 1 Then 6:Z8d%Z
Fsi = Fsi + Sheet1.Cells(5 + i, 19).Value - Sheet1.Cells(5 + i, 20).Value 23>[-XZb[O
ElseIf i = n1 Then Tsa]SN14
Fsi = Fsi + Sheet1.Cells(5 + i, 19).Value + Sheet1.Cells(4 + i, 20).Value * Sheet1.Cells(5 + i, 17).Value tB,(12@W
Else y*vSt^
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 \'*M
}G
End If VK1B}5 /
Next /kkUEo+
Fst2 = FRi / Fsi $Emu*'
If Abs(Fst2 - Fst1) < 0.0000000001 Then @y`xFPB
flag = 0 _J W|3q
Fst1 = Fst2 31G0B_T
Sheet1.Cells(2, 21).Value = Fst1 0x!&>
Else x}?<9(nE c
Fst1 = Fst2 5j1d=h
Sheet1.Cells(2, 21).Value = Fst1 AO|9H`6U6F
End If 6xJffl
Wend CYW@Km{e
End Sub