Bonjour
Jai une macro qui a partir de l'année d'une date saisi me colorie en rouge toutes les cellules dans lesquelles cette année apparait
je souhaiterais isoler dans une autre feuille toutes les cellules en rouge
merci![]()
voici le code de ma macro et le fichier correspondant
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14 Sub date_2() Dim X As Variant Dim Cel As Range X = Application.InputBox("Année de la date", "ANNÉE", Type:=1) If X = False Then Exit Sub Set Cel = Sheets("Feuil1").UsedRange.Find(X, lookat:=xlPart) If Not Cel Is Nothing Then PA = Cel.Address Do Cel.Interior.ColorIndex = 3 Set Cel = Sheets("Feuil1").UsedRange.FindNext(Cel) Loop While Not Cel Is Nothing And Cel.Address <> PA End If End Sub
Partager