
Option Explicit
Sub Colora()
Dim b As Byte, a As Byte
For b = 1 To 100
For a = 1 To 50
If Cells(a, b) = 9 Then
Cells(a, b).Interior.ColorIndex = 3
Exit For
End If
Next a
Next b
End Sub
|
Option Explicit
Sub Colora()
Dim b As Byte, a As Byte
For b = 1 To 100
For a = 1 To 50
If Cells(a, b) = 9 Then
Cells(a, b).Interior.ColorIndex = 3
Exit For
End If
Next a
If Cells(a, b) = 9 Then Exit For
Next b
End Sub |
Option Explicit
Sub Colora()
Dim b As Byte, a As Byte
Cells.Select
With Selection.Interior
.Pattern = xlNone
.TintAndShade = 0
.PatternTintAndShade = 0
End With
Range("A1").Select
For b = 1 To 100
For a = 1 To 50
If Cells(a, b) = 9 Then
Cells(a, b).Interior.ColorIndex = 3
End
End If
Next a
Next b
End Sub |
