Bonjour,
Tout est dans le titre, je voudrais commenter chaque cellule d'une plage.
Je ne comprend pas bien pourquoi ça ne marche pas.
Voilà mon code :
Et voilà un autre bout de mon code qui lui est fonctionnel :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12 With Range("P1137:BH1141") .ClearContents With .Interior .ColorIndex = 13 .Pattern = xlSolid End With .AddComment With .Comment .Visible = False .Text Text:="Discordance with a second measure" End With End With
Peut-être que ça ne marche que pour une cellule et pas pour une plage... ?
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
20
21
22
23
24
25
26
27
28
29
30
31
32 For i = 15 To 60 For j = 2 To 12806 If Cells(j, i) < -1 Then With Cells(j, i) .ClearContents With .Interior .ColorIndex = 45 .Pattern = xlSolid End With .AddComment With .Comment .Visible = False .Text Text:="Value too low" End With End With End If If Cells(j, i) > 10000 Then With Cells(j, i) .ClearContents With .Interior .ColorIndex = 50 .Pattern = xlSolid End With .AddComment With .Comment .Visible = False .Text Text:="Value too high" End With End With End If Next Next
Merci d'avance pour votre aide !
Partager