Bonjour,
Voir ci-joint le fichier, ou ci-arpès le code :
Private Const SEARCHED_WORD As String = "france"
Sub changeColors()
Dim sht As Worksheet
For Each sht In ThisWorkbook.Worksheets
Dim cell As Range
Dim cellsToEvaluate
On Error Resume Next
Set cellsToEvaluate = sht.Cells.SpecialCells(xlCellTypeConstants, 23)
On Error GoTo 0
For Each cell In cellsToEvaluate.Cells
If cell.Value2 = SEARCHED_WORD Then
Range(cell, cell.Offset(0, 2)).Interior.Color = RGB(255, 255, 0)
End If
Next cell
Next sht
End Sub
Note : le code est Case sensitive, il ne detecte que "france", pas "France" ou "FRANCE". Pour ne pas faire attention aux majuscules, remplacer le if par
If InStr(1, cell.Value2, SEARCHED_WORD, vbTextCompare) Then