Примерно так:
Обратите внимание, он будет проверять ряд строк !! Так что, если у вас есть цвет в столбце G, но нет в столбце A. Это даст вам слово «цвет» в столбце AA. Я также решил проверить цвет фона ... не красный, потому что иногда люди выбирают разные "красные".
Если вам нужен только красный (RGB 255,0,0), используйте второе выражение IF и закомментируйте первое.
Sub CheckColurRows()
Dim myRange As Range
Dim cl As Variant
Dim ws As Worksheet
Set ws = Worksheets("Sheet1")
Set myRange = ws.Range("A1:Z5000") 'Set range
For Each cl In myRange 'Loop through each cell in "myRange
If cl.Interior.ColorIndex <> xlColorIndexNone Then 'Check if cell has any background colour (not only red)
'If cl.Interior.Color = RGB(255, 0, 0) Then 'Check if cell only has red colour
ws.Cells(cl.Row, 27) = "Colour" 'If cell has colour, then print the word "Colour" in Column 27 (Column AA)
Else
If ws.Cells(cl.Row, 27) <> "Colour" Then ws.Cells(cl.Row, 27) = "White" 'If cell already have the word colour in column AA, don't overwrite with "white"
End If
Next cl
End Sub
Результат будет таким:
![enter image description here](https://i.stack.imgur.com/LgfVF.png)