XL 2010 Modification Macro.

DAVID-44-

XLDnaute Occasionnel
Bonjour,
J'ai une macro qui me permet de copier sur une "feuille 2" par ordre alphabétique et sur une seule colonne toutes les données d'une autre "feuille 1".
J'aimerais pouvoir copier certaines données en spécifiant des mots clés ( par exemple : poulet; filet; cuisses) dans une autre "feuille 3" avec le même système, les données de la "feuille 1".
Que faut-il que je rajoute, dans ma macro pour arriver à avoir sur la "feuille 3" par ordre alphabétique et sur une seule colonne toutes les données qui correspondent à poulet; filet; cuisses ?
Merci pour votre aide. ;)

Option Explicit
Sub Au_menu()
Dim c As Range
With Application: .ScreenUpdating = False: .Calculation = xlManual: .EnableEvents = False: End With
Sheets("LISTE TOTAL MIDI").Cells.Clear
Range("midi").Copy Destination:=Sheets("LISTE TOTAL MIDI").Range("a1")
Sheets("LISTE TOTAL MIDI").Activate
Columns("A:F").SpecialCells(xlCellTypeBlanks).Delete Shift:=xlUp
Range(Range("b1"), Range("b1").End(xlDown)).Cut Destination:=Range("a65536").End(3)(2)
Range(Range("c1"), Range("c1").End(xlDown)).Cut Destination:=Range("a65536").End(3)(2)
Range(Range("d1"), Range("d1").End(xlDown)).Cut Destination:=Range("a65536").End(3)(2)
Range(Range("e1"), Range("e1").End(xlDown)).Cut Destination:=Range("a65536").End(3)(2)
Range(Range("f1"), Range("f1").End(xlDown)).Cut Destination:=Range("a65536").End(3)(2)
Columns("A:A").SpecialCells(xlCellTypeConstants, 23).Value = Application.Trim(Columns("A:A").SpecialCells(xlCellTypeConstants, 23).Value)
With Range("A:A")
.Sort Range("A1"), xlAscending, Header:=xlNo
.Font.Size = 10
.WrapText = False
.EntireColumn.AutoFit
.HorizontalAlignment = xlLeft
End With
Sheets("LISTE TOTAL SOIR").Cells.Clear
Range("soir").Copy Destination:=Sheets("LISTE TOTAL SOIR").Range("a1")
Sheets("LISTE TOTAL SOIR").Activate
Columns("A:F").SpecialCells(xlCellTypeBlanks).Delete Shift:=xlUp
Range(Range("b1"), Range("b1").End(xlDown)).Cut Destination:=Range("a65536").End(3)(2)
Range(Range("c1"), Range("c1").End(xlDown)).Cut Destination:=Range("a65536").End(3)(2)
Range(Range("d1"), Range("d1").End(xlDown)).Cut Destination:=Range("a65536").End(3)(2)
Range(Range("e1"), Range("e1").End(xlDown)).Cut Destination:=Range("a65536").End(3)(2)
Range(Range("f1"), Range("f1").End(xlDown)).Cut Destination:=Range("a65536").End(3)(2)
Columns("A:A").SpecialCells(xlCellTypeConstants, 23).Value = Application.Trim(Columns("A:A").SpecialCells(xlCellTypeConstants, 23).Value)
With Range("A:A")
.Sort Range("A1"), xlAscending, Header:=xlNo
.Font.Size = 10
.WrapText = False
.EntireColumn.AutoFit
.HorizontalAlignment = xlLeft
End With
With Application: .EnableEvents = True: .Calculation = xlAutomatic: .ScreenUpdating = True: End With
End Sub
 

Discussions similaires

Réponses
6
Affichages
124
Réponses
1
Affichages
160
Réponses
3
Affichages
569
Réponses
4
Affichages
193

Statistiques des forums

Discussions
312 103
Messages
2 085 313
Membres
102 860
dernier inscrit
fredo67