Bonjour,
Je vous expose mon problème :
Je cherche à faire un macro excel permettant d'incrémenter une date "X" d'une certaine période "Y" en fonction de la date de l'ouverture du fichier. Mon programme : ==> Avec la C(6,6) la date X; C(1,5) la date " =AUJOURD'HUI "; C(5,4) la période "Y"
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 Rempalcer() If Cells(6, 6) < Cells(1, 5) Then Cells(5, 5).Value = Cells(5, 5).Value End If If Cells(5, 5) = Cells(1, 5) Then Cells(5, 5).Value = Cells(5, 5).Value End If If Cells(5, 5) > Cells(1, 5) Then Cells(5, 5).Value = Cells(5, 5).Value + Cells(5, 4).Value End If End Sub
Partager