'====================
Sub Surbrillance_avant_deux_points()
'patricktoulon
Dim TxT$, XceLL, X&, Tim#, V&, Nb&
Dim Dif#, DG%, Dec#, M&, S&
Tim = Timer
Application.ScreenUpdating = False
Nb = Cells(Rows.Count, 13).End(xlUp).Row
Label9.Caption = Nb: V = 0
With Sheets("Feuil1")
With Feuil1.Range("M1:M5010")
.Font.Color = RGB(0, 0, 0)
.Font.Bold = False
End With
TxT = ":"
If TxT = "" Then Exit Sub
For Each XceLL In Feuil1.Range("M1:M5010").Cells
With XceLL
If XceLL <> "" Then
X = 1
'-------------------------------
Do
X = InStr(X, UCase(.Text), UCase(TxT))
If X > 0 Then
With .Characters(Start:=1, Length:=X).Font
.ColorIndex = 5
.Bold = True
.Italic = True
End With
V = V + 1
X = X + Len(TxT)
End If
Loop While X > 0
'-------------------------------
End If
End With
Next XceLL
End With
Label3.Caption = V
'-------- mesure durée --------
Dif = Timer - Tim
DG = 3 'Nombre de digit décimale
'------ Récup Décimale --------
Dec = Dif - Fix(Dif)
Dec = Mid(Dec, 3, DG) 'récup unique décimale
'------------------------------
M = Fix((Dif Mod 3600) / 60)
S = Int(Dif) Mod 60
Label7.Caption = Format(M, "#0" & " ' ") & Format(S, "#0" & " '' ") & Dec & " mil"
'------------------------------
Label6.Caption = Format((Timer - Tim), "0#.000 ""S(s)"" ")
Application.ScreenUpdating = True
End Sub
'=========================