Sub Lamho27()
Dim Dico, i As Long, j As Byte
Set Dico = CreateObject("Scripting.Dictionary")
With Worksheets("Feuil1")
For j = 2 To 13 ' pour chaque colonne de B à M
For i = 3 To .Cells(Cells.Rows.Count, j).End(xlUp).Row
Dico(CStr(.Cells(i, j))) = ""
Next
Next
.Cells(3, 14).Resize(Dico.Count, 1) = Application.Transpose(Dico.keys)
End With
=DECALER(Calendrier!$B$2;1;;NBVAL(Calendrier!$B:$B)-1)
=DECALER(Calendrier!$AQ$2;1;;NBVAL(Calendrier!$AQ:$AQ)-1)
Bonjour Paf
Votre code a d'erreur...
End Sub
End With
=DECALER(Calendrier!$AQ$2;1;;NBVAL(Calendrier!$AQ:$AQ)-1)
... est ce qu'on peut faire automatique sans bouton clic ?...
Option Explicit
Sub Code_de_Paf()
Dim Dico, i As Long, j As Byte
Set Dico = CreateObject("Scripting.Dictionary")
With Worksheets("Feuil1")
For j = 2 To 13 ' pour chaque colonne de B à M
For i = 3 To .Cells(Cells.Rows.Count, j).End(xlUp).Row
Dico(CStr(.Cells(i, j))) = ""
Next
Next
.Cells(3, 14).Resize(Dico.Count, 1) = Application.Transpose(Dico.keys)
End With
End Sub
Option Explicit
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Application.ScreenUpdating = 0
If Not Intersect(Target, Range("b3:m65000")) Is Nothing Then
Range(Range("n3"), Range("n3").End(xlDown)) = ""
Call Code_de_Paf
Range("n2:n65000").Sort Range("n2"), xlAscending, Header:=xlYes ' trier
End If
Application.ScreenUpdating = -1
End Sub