1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
Sub Diametre()
Dim Plage As Range
Dim Cel As Range
Dim Col As Integer
Col = Range("S2").Value
With Worksheets("SERIE 4 6 ET 12 14") '<-- vérifier si bien orthographié !
Set Plage = .Range(.Cells(1, Col), .Cells(.Rows.Count, Col).End(xlUp))
End With
'supprime la coloration de fonte précédente
Plage.Characters.Font.Color = RGB(0, 0, 0)
'effectue la recherche
Set Cel = Plage.Find(Range("R2").Value, , xlValues, xlWhole)
'si trouvé, colore la fonte
If Not Cel Is Nothing Then
Cel.Characters(1, Len(Cel.Value)).Font.Color = RGB(0, 153, 255)
End If
End Sub |
Partager