1 pièce(s) jointe(s)
Condition, Like, Font.Bold
Bonjour,
Arrivez-vous à deviner pourquoi ça ne fonctionne pas ?
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| Sub GRAS()
Dim x As Variant
Dim i As Integer
i = 1
x = Cells(i, 1).Value
For Each Worksheet In ActiveWorkbook.Worksheets
For i = 1 To 100
If x Like "Q" & [1-20] Then
Cells(i, 1).Font.Bold = True
Cells(i + 1, 1).Font.Bold = True
End If
Next i
Next
End Sub |
Pièce jointe 583093
L'idée est de mettre en gras tout ce qui est Q1, Q2, ... Q1000 et aussi la ligne juste en-dessous à chaque fois qu'on rencontre un Q1, Q2, ...Q1000.