Sub Change_date()
Dim F As Worksheet, deb As Range, ligOld&, ligNew&, i&, j%, c As Range, cc As Range
Set F = Sheets("Data")
Set deb = Sheets("Planning").[A3]
ligOld = Application.Match(CLng(memB3), F.Columns(1), 0)
memB3 = deb(1, 2) 'nouvelle valeur de la variable Public
ligNew = Application.Match(CLng(memB3), F.Columns(1), 0)
Application.ScreenUpdating = False
Application.EnableEvents = False
Application.Calculation = xlCalculationManual
For i = 1 To 31
For j = 1 To 10
Set c = F.Cells(ligOld + i - 1, IIf(j < 3, 3 - j, j))
Set cc = F.Cells(ligNew + i - 1, IIf(j < 3, 3 - j, j))
If j <> 2 And j <> 9 Then 'il y a des formules dans ces 2 colonnes
c = deb(i, j)
deb(i, j) = cc
End If
'---commentaires---
c.ClearComments
If Not deb(i, j).Comment Is Nothing Then c.AddComment deb(i, j).Comment.Text
deb(i, j).ClearComments
If Not cc.Comment Is Nothing Then deb(i, j).AddComment cc.Comment.Text
Next j, i
Application.Calculation = xlCalculationAutomatic
Application.EnableEvents = True
End Sub