To fix your code update this line: ws.Range(ws.Cells(r, 8), ws.Cells(r, 10)).Font.Color = vbRed
Option Explicit
Public Sub ShowFalse()
Dim ws As Worksheet, lr As Long, r As Long
Set ws = ThisWorkbook.Worksheets("Test")
lr = ws.Cells(ws.Rows.Count, 21).End(xlUp).Row
If lr > 8 Then
Application.ScreenUpdating = False
For r = 9 To lr
If Not IsError(ws.Cells(r, 21)) Then
If ws.Cells(r, 21).Value = False Then
ws.Range(ws.Cells(r, 8), ws.Cells(r, 10)).Font.Color = vbRed
End If
End If
Next
Application.ScreenUpdating = True
End If
End Sub
To make it faster use AutoFilter
Public Sub ShowFalseAF()
Dim ws As Worksheet, lr As Long, fCol As Range, clrCols As Range
Set ws = ThisWorkbook.Worksheets("Test")
lr = ws.Cells(ws.Rows.Count, 21).End(xlUp).Row
If lr > 8 Then
Set fCol = ws.Range(ws.Cells(9, 21), ws.Cells(lr, 21))
Set clrCols = ws.Range(ws.Cells(9, 8), ws.Cells(lr, 10))
Application.ScreenUpdating = False
fCol.AutoFilter 1, False
If fCol.SpecialCells(xlCellTypeVisible).Count > 1 Then
ws.Rows(9).Hidden = ws.Cells(9, 21) <> False
clrCols.Font.Color = vbRed
ws.Rows(9).Hidden = False
End If
fCol.AutoFilter
Application.ScreenUpdating = True
End If
End Sub