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

½Ð°Ý¿ù¦b­þ¸Ì??

½Ð°Ý¿ù¦b­þ¸Ì??

[ª©¥DºÞ²z¯d¨¥]
  • GBKEE(2013/8/1 15:07): ÀɮפW¶Ç¥¢±Ñ,­«·s¤W¶Ç

[attach]15665[/attach]


Sub D¥¿15¥´PS16()

Dim i As Integer, j As Integer, k As Integer
Dim eod1 As Integer, eod2 As Integer, eod3 As Integer, eod4 As Integer, Result As Integer
Dim sum0 As Integer
Dim sum1 As Integer
Dim sum2 As Integer
eod1 = InputBox("½Ð¿é¤J»Ý§PÂ_¸ê®Æ¶}©l¦C¼Æ?")
eod2 = InputBox("½Ð¿é¤J»Ý§PÂ_¸ê®Æµ²§ô¦C¼Æ?")
eod3 = InputBox("½Ð¿é¤J»Ý§PÂ_¸ê®Æ°_©l¦æ¼Æ ?")
eod4 = InputBox("½Ð¿é¤J»Ý§PÂ_¸ê®Æµ²§ô+1 ¦æ¼Æ ?")
Result = InputBox("½Ð¿é¤J»Ý§PÂ_µ²ªGÀx¦s¦æ¼Æ ?")


For i = eod1 To eod2
    sum0 = 0
    sum1 = 0
    sum2 = 0
    For j = eod3 To eod4
    sum1 = sum1 + (Cells(i, j).Value)
        If sum1 >= 15 Then
           sum2 = 0                             '§PÂ_«e¬q¬O§_¦³LB'
            For k = eod3 To j
             If (Cells(i, k).Value) >= 6 Then
             sum2 = sum2 + 1
              Else
              End If
            Next k
        
        
        If (Cells(i, j + 1).Value) >= 6 Then
         sum0 = sum0 - 120 - 1
         Cells(i, Result) = sum
         Cells(i, Result + 2) = "«á¬qLB"        'Åã¥Ü«á¬q¦³LB'
         
         If sum2 = 0 Then                        'Åã¥Ü«e¬q¬O§_¦³LB'
         Cells(i, Result + 1) = "N"
         
         ElseIf sum2 = 1 Then
         Cells(i, Result + 1) = "LB"
         
         ElseIf sum2 = 2 Then
         Cells(i, Result + 1) = "LBB"
         
         ElseIf sum2 = 3 Then
         Cells(i, Result + 1) = "LBBB"
         ElseIf sum2 = 4 Then
         Cells(i, Result + 1) = "LBBBB"
         Else
         End If
         Exit For
        Else
         sum0 = sum0 + Abs(Cells(i, j + 1).Value)
        End If
         sum1 = 1000
            
         
        If Abs(Cells(i, j).Value) = 0 Then '§PÂ_µ²§ô?'
        
        
         
            If (Cells(i, j - 1).Value) = 1 Then       '­×¥¿§À¼Æ-Á«·l-²Ä¤@Áû-­ì¥[¤Wªº'
            Cells(i, Result) = sum0 - 1 - 1 - 1
           
           
            ElseIf (Cells(i, j - 1).Value) = 2 Then
            Cells(i, Result) = sum0 - 4 - 1 - 2
            
         
            ElseIf (Cells(i, j - 1).Value) = 3 Then
            Cells(i, Result) = sum0 - 11 - 1 - 3
            
            ElseIf (Cells(i, j - 1).Value) = 4 Then
            Cells(i, Result) = sum0 - 26 - 1 - 4
           
            ElseIf (Cells(i, j - 1).Value) = 5 Then
            Cells(i, Result) = sum0 - 57 - 1 - 5
            Else
            End If
        
            Cells(i, Result + 2) = "«á¬qN"               'Åã¥Ü«á¬q¦³LB'
            If sum2 = 0 Then                            'Åã¥Ü«e¬q¬O§_¦³LB'
             Cells(i, Result + 1) = "N"
             ElseIf sum2 = 1 Then
             Cells(i, Result + 1) = "LB"
             ElseIf sum2 = 2 Then
             Cells(i, Result + 1) = "LBB"
             ElseIf sum2 = 3 Then
             Cells(i, Result + 1) = "LBBB"
             ElseIf sum2 = 4 Then
              Cells(i, Result + 1) = "LBBBB"
            Else
            End If
            
        End If
        End If
           
           
           
    Next j
   
Next i

End Sub

"°õ¦æ¶¥¬q¿ù»~ 13«¬ºA¤£²Å¦X

TOP

        ÀR«ä¦Û¦b : ¡i®É¤é²öªÅ¹L¡j¤@­Ó¤H¦b¥@¶¡°µ¤F¦h¤Ö¨Æ¡A´Nµ¥©ó¹Ø©R¦³¦hªø¡C¦]¦¹¥²¶·»P®É¶¡Ävª§¡A¤Á²ö¨Ï®É¤éªÅ¹L¡C
ªð¦^¦Cªí ¤W¤@¥DÃD