- ©«¤l
- 561
- ¥DÃD
- 160
- ºëµØ
- 0
- ¿n¤À
- 725
- ÂI¦W
- 0
- §@·~¨t²Î
- WINDOWS
- ³nÅ骩¥»
- xp
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ®ç¶é
- µù¥U®É¶¡
- 2014-9-10
- ³Ì«áµn¿ý
- 2024-8-7
|
¸Õ¸Õ
Sub µ{¦¡()
Sheet1.[F2:F65536].ClearContents
X = Sheet1.[A65536].End(xlUp).Row
For M = 1 To X
If Sheet1.Cells(M, 3) = True And Sheet1.Cells(M, 2) - Sheet1.Cells(M, 4) > 0 Then
Sheet1.Cells(M, 6) = -1
ElseIf Sheet1.Cells(M, 3) = True And Sheet1.Cells(M, 2) - Sheet1.Cells(M, 5) < 0 Then
Sheet1.Cells(M, 6) = 1
ElseIf Sheet1.Cells(M, 3) = True And Sheet1.Cells(M, 2) - Sheet1.Cells(M, 5) >= 0 And Sheet1.Cells(M, 2) - Sheet1.Cells(M, 4) <= 0 Then
Sheet1.Cells(M, 6) = 0
ElseIf Sheet1.Cells(M, 3) = False And Sheet1.Cells(M, 1) - Sheet1.Cells(M, 4) > 0 Then
Sheet1.Cells(M, 6) = -1
ElseIf Sheet1.Cells(M, 3) = False And Sheet1.Cells(M, 1) - Sheet1.Cells(M, 5) < 0 Then
Sheet1.Cells(M, 6) = 1
ElseIf Sheet1.Cells(M, 3) = False And Sheet1.Cells(M, 1) - Sheet1.Cells(M, 5) >= 0 And Sheet1.Cells(M, 1) - Sheet1.Cells(M, 4) <= 0 Then
Sheet1.Cells(M, 6) = 0
End If
Next
End Sub |
|