Bonjour j ai ecrit un code devant renvoye un mot si ce dernier est trouve dans la cellule selectionne.
Tout d abord le code ne marche pas pour le second if alors au il marche pour le premier. Je ne comprends pas pourquoi?
Ensuite serait il possible de le simplifier?
Merci d avance
Voici mon code :
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 Sub text2() Dim c As Range For Each c In Range("B2,B4") If Not c.Find("Weekend") Is Nothing Then Cells(c.Row, 1).Value = "Weekend" End If If Not c.Find("Day Ahead") Is Nothing Then Cells(c.Row, 1).Value = "Day Ahead" End If Next End Sub
Partager