










Super !! merci
Dans ta formule comment tu fait pour que 2 corresponde à R/N, 3 à H/B, 4 à P/I ?
Mamas.
mamas a écrit:artemuse a écrit: On ne peut entrer que 3 conditions maximum dans ce dialogue. Heureusement, c'est tout ce qu'on a besoin pour la roulette et les chances simples.
Donc tu me confirme, pas possible d'avoir plus de trois conditions ?
Mamas.
Sub changerQuelquesProp()
Dim cellule As Range
For Each cellule In Selection
cellule.Font.ColorIndex = 3 '< fond avant-plan rouge
cellule.Interior.ColorIndex = 11 '< fond arrière plan bleu
cellule.Interior.Pattern = xlSolid '< fond arrière plan solide
cellule.Font.Bold = True '< la police est en caractère gras
Next cellule
End Sub- un numéro sort pour la première fois : 1ere couleur
- un numéro sort pour la 2eme fois : 2eme couleur
- un numéro sort pour la troisième fois : 3eme couleur
- Etc...

Sub genererNouvelleSequence()
Dim nbDeCellule As Long, noRange As Long, niveauDegreChaleur As Long
Dim celluleModele As Range, cellule As Range
Range("E:E").ClearFormats
Worksheets(1).Calculate
nbDeCellule = Application.WorksheetFunction.CountA(Range("A:A"))
For noRange = 2 To nbDeCellule
Set cellule = Range("E" & noRange)
If cellule.Value >= 8 Then
cellule.Font.ColorIndex = Range("degreChaleur").Cells(7).Font.ColorIndex '< coul. avant-plan
cellule.Interior.ColorIndex = Range("degreChaleur").Cells(7).Interior.ColorIndex '< coul. arrière plan
cellule.Interior.Pattern = xlSolid '< fond arrière plan solide
cellule.Font.Bold = Range("degreChaleur").Cells(7).Font.Bold '< gras ou normal ?
ElseIf cellule.Value >= 2 Then
cellule.Font.ColorIndex = Range("degreChaleur").Cells(cellule.Value - 1).Font.ColorIndex '< coul. avant-plan
cellule.Interior.ColorIndex = Range("degreChaleur").Cells(cellule.Value - 1).Interior.ColorIndex '< coul. arrière plan
cellule.Interior.Pattern = xlSolid '< fond arrière plan solide
cellule.Font.Bold = Range("degreChaleur").Cells(cellule.Value - 1).Font.Bold '< gras ou normal ?
End If
Next noRange
End SubUtilisateurs parcourant ce forum: Aucun utilisateur enregistré et 1 invité