Sub Tirage()
Dim r As Range, a$, nlig&, ncol%, limite, d As Object, c As Range
Set r = [A1:B25] 'plage à adapter
a = r.Address
nlig = r.Rows.Count: ncol = r.Columns.Count
limite = 10 'à adapter
r.Interior.ColorIndex = xlNone 'RAZ
If limite > Round(Evaluate("SUM(1/COUNTIF(" & a & "," & a & "))")) _
Then MsgBox "Pas de solution, revoyez la limite !", 48: Exit Sub
Randomize
Set d = CreateObject("Scripting.Dictionary")
While d.Count < limite
Set c = r(Int(1 + Rnd * nlig), Int(1 + Rnd * ncol))
If Not d.exists(c.Value) Then
d(c.Value) = ""
c.Interior.ColorIndex = IIf(d.Count < limite, 47, 3)
End If
Wend
End Sub