Titre du sujet : Re: recherche automatique....... par myDearFriend! le 25/06/2008 01:00:35
Re oxor,
Tu trouveras ci-joint ton classeur modifié pour tenter une réponse à ta demande.
J'ai utilisé le code suivant :
Option Explicit
Sub Traitement()
'myDearFriend! - www.mdf-xlpages.com
Dim F As Worksheet
Dim L As Long
Application.ScreenUpdating = False
'Distribution des données
With Sheets("Feuille de saisie")
For L = 7 To .Cells(Application.Rows.Count, 1).End(xlUp).Row
With .Rows(L)
If Application.CountA(.Range("E1:AC1")) > 0 Then
.Range("C1,E1:AC1").Copy
Sheets(.Range("A1").Text).Cells(Application.Rows.Count, 1) _
.End(xlUp).Offset(1, 0).PasteSpecial Paste:=xlPasteValues
End If
End With
Next L
End With
Application.CutCopyMode = False
'Classement alpha
For Each F In Sheets
With F
If .Name <> "Feuille de saisie" Then
L = .Cells(Application.Rows.Count, 1).End(xlUp).Row
If L > 3 Then
.Range(.Cells(4, 1), .Cells(L, 1)).EntireRow.Sort _
Key1:=.Cells(4, 1), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
End If
End If
End With
Next F
Application.ScreenUpdating = True
MsgBox "Traitement effectué !"
End Sub
J'espère que ça pourra répondre à ton besoin... si tel est le cas, merci de penser à solder le présent fil de discussions.
Cordialement,
|