Bonjour Isabelette,
j'avais oublié... Excel 2003...
Pour faire vite, j'ai affecté le code à un joli petit bouton de commande bleu en haut à gauche de ton tableau, histoire d'ajouter ma petite boule au sapin!
Je vois dans ton fichier que tu as supprimé Worksheet_Change : cela veut-il dire que tu ne traites tes tableaux qu'une seule fois, quand ils sont terminés? Pas de changement quotidien (utilité de Change)?
Si j'ai le temps ce soir, j'intégrerai cette procédure dans Worksheet_SelectionChange.
Private Sub cmdRTRR_Click()
'
Application.EnableEvents = False
Application.ScreenUpdating = False
'
iCol = Cells(3, Columns.Count).End(xlToLeft).Column
'
For BisRepetita = 1 To 2
iStart = IIf(BisRepetita = 1, 7, 19)
iStop = IIf(BisRepetita = 1, 15, 29)
For x = iStart To iStop
iFlag = 0
For y = 3 To iCol
Select Case Cells(x, y)
Case "R"
If iFlag = 2 Then
sCol2 = Split(Columns(y - 1).Address(ColumnAbsolute:=False), ":")(1)
Range(sCol1 & x & ":" & sCol2 & x).Interior.Color = RGB(0, 0, 255)
End If
iFlag = 1
Case "T5"
If iFlag = 1 Then
sCol1 = Split(Columns(y).Address(ColumnAbsolute:=False), ":")(1)
iFlag = 2
End If
Case Else
iFlag = 0
End Select
Next
Next
Next
'
Application.ScreenUpdating = True
Application.EnableEvents = True
'
End Sub
A+