Bonjour,
Copiez ce code dans le module de la feuille "Mesures", lors de la sélection d'une des cellules choisies, la date et l'heure s'appliquent au format désiré.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
On Error GoTo Sortie
Application.EnableEvents = False
If Not Intersect(Target, Range("A2,A8,A14,A22,A28,A34,I2,I8,I14,I22,I28,I34")) Is Nothing Then
Target.Value = Format(Now, "dddd dd mmmm yyyy") & " & " & Format(Now, "HH:MM:SS")
Target = Application.WorksheetFunction.Proper(Target)
Target.Font.ColorIndex = 1
Target.Characters(Start:=1, Length:=1).Font.ColorIndex = 3 'la majuscule du jour en rouge
Position_du_1er_espace = InStr(1, Target, " ", 1) + 1
Position_du_mois = InStr(Position_du_1er_espace, Target, " ", 1) + 1
Target.Characters(Start:=Position_du_mois, Length:=1).Font.ColorIndex = 3 'la majuscule du mois en rouge
Position_du_& = InStrRev(Target, " ", -1)
Target.Characters(Start:=Position_du_& - 1, Length:=1).Font.ColorIndex = 3 'le & en rouge
End If
Sortie:
Application.EnableEvents = True
End Sub
Cdlt