Poi secondo Te quel tipo di ricerca riesco a farla modificandola solo se il terno è su una singola ruota, ad esempio se su Torino trova il 90 con i numeri 65 e 25 in ogni posizione ma stessa ruota o per excel stessa riga.
Sub sommaT() Dim r, r1, c, c1, x, y, k, d, n, t, rng Set rng = Range("E8:I18") Range("E8:I18").Interior.Color = RGB(198, 224, 180) Range("D8:D18").Font.Color = RGB(0, 0, 0) n = Cells(6, 11) r1 = 8 c1 = 5 t = 0 For Each k In rng If k = n Then r = k.Row: c = k.Column: t = 1 Cells(r, c).Interior.Color = RGB(255, 255, 0) If t = 1 Then For y = 5 To 9 d = Cells(r, y) If d = n Then GoTo 1 For x = r1 To r1 + 10 If x = r Then GoTo 2 If Cells(x, y) = n Then GoTo 2 If d = 6 Then d = d End If If d + Cells(x, y) = n Then Cells(x, y).Interior.Color = RGB(0, 176, 240) Cells(x, 4).Font.Color = RGB(255, 0, 0) Cells(r, y).Interior.Color = RGB(0, 176, 240) Cells(r, 4).Font.Color = RGB(255, 0, 0) n = n End If 2 Next x Next y t = 0 End If End If Next k End Sub
Sub sommaO() Dim r, r1, c, c1, x, y, k, k0, k1, d, n, t, rng Set rng = Range("E8:I18") Range("E8:I18").Interior.Color = RGB(198, 224, 180) Range("D8:D18").Font.Color = RGB(0, 0, 0) n = Cells(6, 11) r1 = 8 c1 = 5 t = 0 For Each k In rng If k = n Then r = k.Row: c = k.Column: t = 1 Cells(r, c).Interior.Color = RGB(255, 255, 0) If t = 1 Then For x = 8 To 18 For y = 5 To 8 For k0 = y + 1 To 9 If Cells(x, y) = n Then GoTo 2 k1 = Cells(x, y) + Cells(x, k0) If Cells(x, y) + Cells(x, k0) = n And x = r Then Cells(x, y).Interior.Color = RGB(0, 176, 240) Cells(x, 4).Font.Color = RGB(255, 0, 0) Cells(x, k0).Interior.Color = RGB(0, 176, 240) End If Next k0 2 Next y 1 Next x t = 0 End If End If Next k End Sub