Re : Format avec centième heure marche plus
Bonjour,
La cellule est-elle bien au format : hh:mm:ss,00 ?
Si c'est le cas, un exemple en pièce jointe permettrait peut-être de solutionner le problème.
abcd
Bonjour,
Voici le VBA associé à l'application (fait par Eric Renaud) :
Sub Traite()
Application.ScreenUpdating = False
Dim Tabl()
Range("A1").CurrentRegion.Select
NbTour = Selection.Columns.Count - 1
Range([A2], [A65536].End(xlUp)).Select
A = Selection.Value
ReDim Tabl(1 To UBound(A, 1), 1)
For j = 1 To UBound(A, 1)
Tabl(j, 1) = A(j, 1)
Next j
Application.GoTo Reference:=Range("A1"), scroll:=True
Recommence:
NoDossard = InputBox("Saisir le N° du dossard", "Suivi du parcours Moto-enduro")
If NoDossard = "" Then End
For i = 1 To UBound(A, 1)
If Tabl(i, 1) = CInt(NoDossard) Then
For NbCol = 1 To NbTour
If (Cells(i + 1, NbCol + 1)) = "" Then
Cells(i + 1, NbCol + 1).FormulaR1C1 = "=NOW()"
Cells(i + 1, NbCol + 1).Value = Cells(i + 1, NbCol + 1).Value
Application.GoTo Reference:=Range("A1"), scroll:=True
Application.ScreenUpdating = True
Application.ScreenUpdating = False
Exit For
Else
End If
Next NbCol
End If
Next i
GoTo Recommence
End Sub
Avec la fonction "now" j'ai la date qui s'affiche avec, j'ai les centièmes en formatant en hh:mm:ss.00
Ce format n'est pas pérenne car si je selectionne la cellule et que je clique sur la barre de formule, les centième se mettent à ".00"
J'aimerai que l'heure soit définitive et immuable.
Merci de votre aide