Re : Tableau planning
Merci Victor21
Donc je modifie comme cela la macro :
Application.ScreenUpdating = False
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect([C2:C200], Target) Is Nothing And Target.Count = 1 Then
début = Cells(Target.Row, 1)
fin = Cells(Target.Row, 2)
If début > 0 And fin > 0 Then
Set mondico = CreateObject("Scripting.Dictionary")
For ligne = 2 To 100
If (début >= Cells(ligne, 1) And début <= Cells(ligne, 2)) Or _
(fin >= Cells(ligne, 1) And fin <= Cells(ligne, 2)) Or _
(début <= Cells(ligne, 1) And fin >= Cells(ligne, 2)) Then
temp = Cells(ligne, 3)
mondico(temp) = temp
End If
Next ligne
[I2:I100].ClearContents
For Each c In [Salles]
If Not mondico.Exists(c.Value) Then
[I65000].End(xlUp).Offset(1) = c
End If
Next c
Else
[I2:I100].ClearContents
End If
End If
End Sub
Application.ScreenUpdating = true
Et cela s'enregistre tous seul ou faut-il réactiver la macro et comment faire ?
Je finirais tous cela lundi matin au taf car à la maison j'ai pas excel seulement open office