コンサルタントのたまご

はやくヒヨコになりたい

特定のセルを赤くするマクロ

Sub 全シート繰り返し
  Application.ScreenUpdating = False
   Dim Sht As Worksheet
     For Each Sht In Worksheets
       Sht.Select
       Call FALSEセルを赤くする
     Next Sht
  Application.ScreenUpdating = True
End Sub
 
Sub FALSEセルを赤くする
    Cells.Select
    Selection.FormatConditions.Add Type:=xlTextString, String:="FALSE", _
        TextOperator:=xlContains
    Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
    With Selection.FormatConditions(1).Interior
        .PatternColorIndex = xlAutomatic
        .Color = 255
        .TintAndShade = 0
    End With
    Selection.FormatConditions(1).StopIfTrue = False
End Sub