a = 31
For i = 7 To 26
If Cells(i, 4).Value < 0 Then
Cells(a, 4).Value = Cells(i, 4)
Cells(a, 2).Value = Cells(i, 2)
Cells(a, 4).Font.Color = vbWhite
Cells(a, 4).Interior.Color = vbBlack
Cells(a, 2).Font.Color = vbWhite
Cells(a, 2).Interior.Color = vbBlack
If Cells(i, 12).Value < 0 Then
Cells(a, 12).Value = Cells(i, 12)
Cells(a, 10).Value = Cells(i, 10)
Cells(a, 12).Font.Color = vbWhite
Cells(a, 12).Interior.Color = vbBlack
Cells(a, 10).Font.Color = vbWhite
Cells(a, 10).Interior.Color = vbBlack
If Cells(i, 20).Value < 0 Then
Cells(a, 20).Value = Cells(i, 20)
Cells(a, 18).Value = Cells(i, 18)
Cells(a, 20).Font.Color = vbWhite
Cells(a, 20).Interior.Color = vbBlack
Cells(a, 18).Font.Color = vbWhite
Cells(a, 18).Interior.Color = vbBlack
a = a + 1
End If
End If
End If
Next i
Yukarıdaki kodda a=a+1 yazmama rağmen a değişkeni fazla 32 ye çıkıyor. Problemi çözemedim . Yardımlarınız için.
For i = 7 To 26
If Cells(i, 4).Value < 0 Then
Cells(a, 4).Value = Cells(i, 4)
Cells(a, 2).Value = Cells(i, 2)
Cells(a, 4).Font.Color = vbWhite
Cells(a, 4).Interior.Color = vbBlack
Cells(a, 2).Font.Color = vbWhite
Cells(a, 2).Interior.Color = vbBlack
If Cells(i, 12).Value < 0 Then
Cells(a, 12).Value = Cells(i, 12)
Cells(a, 10).Value = Cells(i, 10)
Cells(a, 12).Font.Color = vbWhite
Cells(a, 12).Interior.Color = vbBlack
Cells(a, 10).Font.Color = vbWhite
Cells(a, 10).Interior.Color = vbBlack
If Cells(i, 20).Value < 0 Then
Cells(a, 20).Value = Cells(i, 20)
Cells(a, 18).Value = Cells(i, 18)
Cells(a, 20).Font.Color = vbWhite
Cells(a, 20).Interior.Color = vbBlack
Cells(a, 18).Font.Color = vbWhite
Cells(a, 18).Interior.Color = vbBlack
a = a + 1
End If
End If
End If
Next i
Yukarıdaki kodda a=a+1 yazmama rağmen a değişkeni fazla 32 ye çıkıyor. Problemi çözemedim . Yardımlarınız için.
