Nouveau code :
Dim plage, plage1, plage2, v1, v2, cell
Sub Cas()
'casUn()
Set plage = Range("B2:B11,D3:D6") 'Exemple
v1 = Application.WorksheetFunction.Large(plage, 1)
plage.Find(v1, LookAt:=xlWhole).Interior.Color = 65535
'casDeux()
Set plage = Range("B15:B24,D15:D24") 'Exemple
Set plage1 = Range("B15:B24")
Set plage2 = Range("D15:D24")
v1 = Application.WorksheetFunction.Large(plage, 1)
If Application.WorksheetFunction.CountIf(plage1, v1) _
+ Application.WorksheetFunction.CountIf(plage2, v1) = 1 Then
v2 = Application.WorksheetFunction.Large(plage, 2)
plage.Find(v1, LookAt:=xlWhole).Interior.Color = 65535
plage.Find(v2, LookAt:=xlWhole).Interior.Color = 65535
Else
Set cell = plage.Find(v1, LookAt:=xlWhole)
cell.Interior.Color = 65535
plage.Find(v1, after:=cell, LookAt:=xlWhole).Interior.Color = 65535
End If
End Sub
Cela te convient-il ?
Bye !