ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] ½Ð°Ý¤ñ¸ûªº¤½¦¡¡H

¸Õ¸Õ

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
ù

TOP

        ÀR«ä¦Û¦b : Ä@­n¤j¡B§Ó­n°í¡B®ð­n¬X¡B¤ß­n²Ó¡C
ªð¦^¦Cªí ¤W¤@¥DÃD