Private Sub based on particle counting precision filter ()
Dim As Integer I
Dim X, X1, X2, B1, B2 As Double
If the Range (" D25 "). The Value & gt; 5 Then
Range (" E4 "). The Value="https://bbs.csdn.net/topics/" "& amp; Range (" I6 ")
The Else
For I=1 To 8
If the Range (" D "& amp; "25 + I") & gt; 5 Then=
X1=Range (" I "& amp; "5 + I"). The Value
X2=Range (" J "& amp; "5 + I"). The Value
B1=Range (" D "& amp; "24 + I"). The Value
B2=Range (" D "& amp; 25 + "I"). The Value
The Exit For
Next I
X=(X1 - X2) * Log (5/B1)/Log (B1/B2) + X1
Range (" E4 "). The Value=https://bbs.csdn.net/topics/X
End the If
If I=8 Then
Range (" E4 "). The Value="https://bbs.csdn.net/topics/"> & amp; Range (" J13 ")
End the If
End Sub
CodePudding user response:
For what is wrong to sayCodePudding user response:
For I=1 To 8Next
After I=9
So you If I=8 this judgment could not get total
This is only a matter of logic, and does not result in an error,
CodePudding user response: