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 30 31 32 33 34 35 36 37 38 39 40
| Sub Mise_En_Forme_Cellule()
Dim i As Double, DL As Double
Application.ScreenUpdating = False
With ThisWorkbook.Worksheets("Test")
.Activate
.Range("E:E,G:G,H:H,J:J,K:K,M:N,P:Q,S:U,W:W,Z:AB,AD:AD,AG:AI,AK:AL,AQ:AQ,AS:AS,AV:AV,AX:AX,BA:BA,BC:BC,BF:BF,BH:BI").NumberFormat = "@"
.Range("B:B,AM:AM").NumberFormat = "0"
.Range("D:D,F:F,I:I,L:L,O:O,R:R,V:V,X:X,Y:Y,AC:AC,AE:AE,AF:AF,AJ:AJ,AN:AN,AO:AO,AP:AP,AR:AR,AT:AU,AW:AW,AY:AZ,BB:BB,BD:BE,BG:BG").NumberFormat = "dd/mm hh:mm"
DL = .Cells(.Rows.Count, 2).End(xlUp).Row
' For i = 3 To DL
'If .Cells(i, 4) <> "" Then .Cells(i, 4) = DateValue(.Cells(i, 4)) + TimeValue(.Cells(i, 4))
'If .Cells(i, 6) <> "" Then .Cells(i, 6) = DateValue(.Cells(i, 6)) + TimeValue(.Cells(i, 6))
'If .Cells(i, 9) <> "" Then .Cells(i, 9) = DateValue(.Cells(i, 9)) + TimeValue(.Cells(i, 9))
'If .Cells(i, 12) <> "" Then .Cells(i, 12) = DateValue(.Cells(i, 12)) + TimeValue(.Cells(i, 12))
'If .Cells(i, 15) <> "" Then .Cells(i, 15) = DateValue(.Cells(i, 15)) + TimeValue(.Cells(i, 15))
'If .Cells(i, 18) <> "" Then .Cells(i, 18) = DateValue(.Cells(i, 18)) + TimeValue(.Cells(i, 18))
'If .Cells(i, 22) <> "" Then .Cells(i, 22) = DateValue(.Cells(i, 22)) + TimeValue(.Cells(i, 22))
'If .Cells(i, 24) <> "" Then .Cells(i, 24) = DateValue(.Cells(i, 24)) + TimeValue(.Cells(i, 24))
'If .Cells(i, 25) <> "" Then .Cells(i, 25) = DateValue(.Cells(i, 25)) + TimeValue(.Cells(i, 25))
'If .Cells(i, 29) <> "" Then .Cells(i, 29) = DateValue(.Cells(i, 29)) + TimeValue(.Cells(i, 29))
'If .Cells(i, 31) <> "" Then .Cells(i, 31) = DateValue(.Cells(i, 31)) + TimeValue(.Cells(i, 31))
'If .Cells(i, 32) <> "" Then .Cells(i, 32) = DateValue(.Cells(i, 32)) + TimeValue(.Cells(i, 32))
'If .Cells(i, 36) <> "" Then .Cells(i, 36) = DateValue(.Cells(i, 36)) + TimeValue(.Cells(i, 36))
'If .Cells(i, 40) <> "" Then .Cells(i, 40) = DateValue(.Cells(i, 40)) + TimeValue(.Cells(i, 40))
'If .Cells(i, 41) <> "" Then .Cells(i, 41) = DateValue(.Cells(i, 41)) + TimeValue(.Cells(i, 41))
'If .Cells(i, 42) <> "" Then .Cells(i, 42) = DateValue(.Cells(i, 42)) + TimeValue(.Cells(i, 42))
'If .Cells(i, 44) <> "" Then .Cells(i, 44) = DateValue(.Cells(i, 44)) + TimeValue(.Cells(i, 44))
'If .Cells(i, 46) <> "" Then .Cells(i, 46) = DateValue(.Cells(i, 46)) + TimeValue(.Cells(i, 46))
'If .Cells(i, 47) <> "" Then .Cells(i, 47) = DateValue(.Cells(i, 47)) + TimeValue(.Cells(i, 47))
'If .Cells(i, 49) <> "" Then .Cells(i, 49) = DateValue(.Cells(i, 49)) + TimeValue(.Cells(i, 49))
'If .Cells(i, 51) <> "" Then .Cells(i, 51) = DateValue(.Cells(i, 51)) + TimeValue(.Cells(i, 51))
'If .Cells(i, 52) <> "" Then .Cells(i, 52) = DateValue(.Cells(i, 52)) + TimeValue(.Cells(i, 52))
'If .Cells(i, 54) <> "" Then .Cells(i, 54) = DateValue(.Cells(i, 54)) + TimeValue(.Cells(i, 54))
'If .Cells(i, 56) <> "" Then .Cells(i, 56) = DateValue(.Cells(i, 31)) + TimeValue(.Cells(i, 31))
'If .Cells(i, 57) <> "" Then .Cells(i, 57) = DateValue(.Cells(i, 31)) + TimeValue(.Cells(i, 31))
'If .Cells(i, 59) <> "" Then .Cells(i, 59) = DateValue(.Cells(i, 31)) + TimeValue(.Cells(i, 31))
'Next i
End With
Application.ScreenUpdating = True
End Sub |
Partager