Bonjour à tous,
Je n'arrive pas à comprendre pourquoi ma 2ème condition avec OR n'est pas prise en compte.
C'est à dire qu'il colorie bien ma celulle "FR" mais pas "NL".
En vous remerciant par avance pour votre aide.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 Sub Generic6() Dim db As Workbook Set db = Workbooks("wk49production") 'Worksheets("Packing Production Schedule") For x = 1 To 1000 Celltxt = db.Worksheets("Packing Production Schedule").Cells(x, 12).Text If InStr(1, Celltxt, "FR") Or InStr(1, Celltxt, "NL") And Cells(x, 10) = 6 Then db.Worksheets("Packing Production Schedule").Cells(x, 12).Interior.Color = RGB(0, 255, 0) db.Worksheets("Packing Production Schedule").Cells(x, 12).Font.Bold = True End If Next End Sub
Partager