Bonjour a tous!
Je souhaiterai comprendre pourquoi ce petit bout de code met aussi longtemps a s'executer et du coup l'ameliorer si possible!
Il faut savoir que je mets dans la colonne A environ 11000 dates (que je copie/colle d'un autre fichier generalement)
Merci beaucoup de votre aide!
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 Private Sub Worksheet_Change(ByVal Target As Range) Application.ScreenUpdating = False Application.Calculation = xlCalculationManual Dim LastLine As Long LastLine = Range("a65536").End(xlUp).Row For i = 6 To LastLine If Not Application.Intersect(Target, Cells(i, 1)) Is Nothing Then Cells(i, 2).Value = Year(Cells(i, 1).Value) Cells(i, 3).Value = Month(Cells(i, 1).Value) Cells(i, 4).Value = Day(Cells(i, 1).Value) End If Next i Application.ScreenUpdating = True Application.Calculation = xlCalculationAutomatic End Sub
Partager