Sub PremierTexte()
Dim R&, G&, B&
Rows("1:2").Clear: Randomize 1600
With Application
.ScreenUpdating = False
R = .RandBetween(0, 255): G = .RandBetween(0, 255): B = .RandBetween(0, 255)
[B2:H2] = Array(1, 23, 458, 59, "Staple", 695, "ABC", 1125)
[A2].Formula = "=INDEX(R2C2:R2C8,MATCH(TRUE,INDEX(ISTEXT(R2C2:R2C8),0),0))"
'<- Seule la formule ci-dessus est à retenir dans cette macro de test ;-)
[A2].Font.Bold = -1: [A2].Interior.Color = RGB(R, G, B)
End With
End Sub