Avec ce code cela ne marche pas
'employes = Range("A3:A" & Range("A" & Rows.Count).End(xlUp).Row)
'Set appeler = CreateObject("Scripting.dictionary")
'For Each sh In Sheets
'If sh.Name <> ActiveSheet.Name Then
'tablo = sh.Range("B1:J" & sh.Range("B" & Rows.Count).End(xlUp).Row)
'Ligne = 3
'For n = LBound(tablo, 1) To UBound(tablo, 1)
' If tablo(n, 8) <> "" Then
' For m = LBound(employes, 1) To UBound(employes, 1)
' If tablo(n, 8) = employes(m, 1) Then
' If tablo(n, 2) <> tablo(n, 8) And tablo(n, 4) <> tablo(n, 8) And tablo(n, 5) <> tablo(n, 8) Then
' X = tablo(n, 8)
' appeler(X) = X
' End If
' End If
' Next
' End If
' If tablo(n, 9) <> "" Then
' For m = LBound(employes, 1) To UBound(employes, 1)
' If tablo(n, 2) <> tablo(n, 9) And tablo(n, 4) <> tablo(n, 9) And tablo(n, 5) <> tablo(n, 9) Then
' If tablo(n, 9) = employes(m, 1) Then
' X = tablo(n, 9)
' appeler(X) = X
' End If
' End If
' Next
' End If
'Next
'End If
'Set c = ActiveSheet.Rows(1).Find(Split(sh.Name)(0), LookIn:=xlValues, lookat:=xlWhole)
'If Not c Is Nothing Then
' Cells(3, c.Column).Resize(appeler.Count) = Application.Transpose(appeler.keys)
' a = appeler.RemoveAll
'End If
'Next
Avec celui-ci cela fonctionne mais sur une colonne
tablo = Sheets(Range("F1").Text).Range("B1:J" & Sheets(Range("F1").Text).Range("B" & Rows.Count).End(xlUp).Row)
employes = Range("A3:A" & Range("A" & Rows.Count).End(xlUp).Row)
Ligne = 3
Set appeler = CreateObject("Scripting.dictionary")
For n = LBound(tablo, 1) To UBound(tablo, 1)
If tablo(n, 8) <> "" Then
For m = LBound(employes, 1) To UBound(employes, 1)
If tablo(n, 8) = employes(m, 1) Then
If tablo(n, 2) <> tablo(n, 8) And tablo(n, 4) <> tablo(n, 8) And tablo(n, 5) <> tablo(n, 8) Then
X = tablo(n, 8)
appeler(X) = X
End If
End If
Next
End If
If tablo(n, 9) <> "" Then
For m = LBound(employes, 1) To UBound(employes, 1)
If tablo(n, 2) <> tablo(n, 9) And tablo(n, 4) <> tablo(n, 9) And tablo(n, 5) <> tablo(n, 9) Then
If tablo(n, 9) = employes(m, 1) Then
X = tablo(n, 9)
appeler(X) = X
End If
End If
Next
End If
Next
Range("F3").Resize(appeler.Count) = Application.Transpose(appeler.keys)