Bonjour
Le problème, c'est que le fichier qui te pose problème n'a pas la même structure que l'ancien fichier que tu joins.
Je te joins une nouvelle version un peu modifiée du derbier fichier.
Elle est compressée : sait-on jamais, peut-être ainsi pourras-tu l'ouvrir ?
Au cas où, je joins le code de la page VBA attachée au module 1 :
Dim plage As Range, cell As Range, tablo(), dico As Object
Dim i&, iR&, j&, k&
Sub Doublons()
Set dico = CreateObject("Scripting.Dictionary")
Set plage = Range("C14")
For j = 3 To 18 Step 3
Set plage = Union(plage, Range(Cells(13, j), Cells(74, j)))
Next j
plage.Interior.Color = xlNone 'On enlève les couleurs des colonne C,F,I,L et O
tablo = Range("A1:P74")
'On compte les valeurs indentiques
For i = 13 To UBound(tablo, 1)
For j = 3 To UBound(tablo, 2) - 1 Step 3
If tablo(i, j) <> "" Then
If dico.exists(UCase(tablo(i, j))) Then
dico(UCase(tablo(i, j))) = dico(UCase(tablo(i, j))) + 1
Else
dico(UCase(tablo(i, j))) = 1
End If
End If
Next j
Next i
'on traite les doublons
For i = 13 To UBound(tablo, 1)
For j = 3 To UBound(tablo, 2) - 1 Step 3
If dico(UCase(tablo(i, j))) > 1 Then
Cells(i, j).Interior.Color = Range("U3").Interior.Color
End If
Next j
Next i
End Sub
et celui attachée à la feuille "ORGA MODELE" :
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub
If Not Intersect(Target, Range("C13:C74, F13:F74, I13:I74, L13:L74, O13:O74, R13:R74,C9")) _
Is Nothing Then
Call Doublons
End If
End Sub
'POUR COLONNE Q R S
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Not Application.Intersect(Target, Range("S13:S74")) Is Nothing Then
Ligne = ActiveCell.Row
Range("Q" & Ligne) = Range("Q" & Ligne) & " "
Range("R" & Ligne) = Range("R" & Ligne) & " "
ElseIf Target.Address = "$U$3" Then
Call Doublons
End If
End Sub