Sub convertH()
Const minDec = 1 / 60
Dim datas, lig As Long, col As Long, signe As Boolean, tmp
datas = [A1].CurrentRegion.Offset(2, 1).Value
For lig = 1 To UBound(datas, 1)
For col = 1 To UBound(datas, 2)
If InStr(datas(lig, col), ":") > 0 Then
signe = Left(datas(lig, col), 1) = "-"
If signe Then datas(lig, col) = Mid(datas(lig, col), 2)
' des heures >24 empêchent d'utiliser TimeValue pour la conversion
tmp = Split(datas(lig, col), ":")
datas(lig, col) = Round(tmp(0) + tmp(1) * minDec, 7)
If signe Then datas(lig, col) = -datas(lig, col)
End If
Next col
Next lig
With [B3].Resize(UBound(datas, 1), UBound(datas, 2))
.Value = datas
.NumberFormat = "0.00""h"";-0.00""h"";;@"
End With
End Sub