Part of the problem is the cell where 100.73 is located is not formatted as a percent. It is formatted as a General number.
The code I gave you looked for cells which were formatted as percent.
If rgCell.NumberFormat = "0.00%" _
Or rgCell.NumberFormat = "0.0%" _
Or rgCell.NumberFormat = "0%" Then
Then it looked for values over 1 (which is 100%).
The following code uses a different method.
It searches the active sheet for "Inv %".
Then it looks at the cell one to the right.
If the value is > 100 it colors the cell red.
Sub ColorInvPercentOver100()
Dim rgCell As Range, sAddress As String
With ActiveSheet.UsedRange
Set rgCell = .Find(What:="Inv %", LookIn:=xlValues)
If Not rgCell Is Nothing Then
sAddress = rgCell.Address
Do 'Check next cell over
If rgCell.Cells(1, 2) > 100 Then
rgCell.Cells(1, 2).Interior.ColorIndex = 3 'red
End If
Set rgCell = .FindNext(rgCell)
Loop While Not rgCell Is Nothing And rgCell.Address <> sAddress
End If
End With
End Sub
Bookmarks