Bonjour Forum,
Je rencontre un sérieux problème... J'avais un formule qui fesait un tri sur une colonne B3de A4: K200, en Numérique et cela fonctionnait bien.
J'ai du modifier et traiter la colonne C3 qui est Alphabétique, mais cela me fais un vide depuis A3 de plusieurs lignes sans rien dedant ?
J'ai essayé de chercher une solution comme ci dessous, mais rien ni fait... Puvez vous m'aider à touver une solution ou corriger ce VBA.
Un grand merci à toute les personnes qui aident. Fermo
Sub TriStock()
' Selectionne la première cellule du tableau
Range("A3").Select
' Boucle tant que pas vide
'nbligne = 0
'Do While Not (IsEmpty(ActiveCell))
' nbligne = nbligne + 1
' Selection.Offset(1, 0).Select
'Loop
nbligne = Range(Cells(1, 3), Cells(11, 3).End(xlDown)).Rows.Count
'Range(Cells(1, 4), Cells(11, nbligne)).Select
'Range("A4:K500").Select
'Range(Selection, Selection.End(xlToRight)).Select
'Range(Selection, Selection.End(xlDown)).Select
ActiveSheet.Unprotect
Selection.Sort Key1:=Range("c3"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
'Range("a4:k500").Select
' Selection.Sort Key1:=Range("c3"), Order1:=xlAscending, Header:=xlGuess, _
' OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
' DataOption1:=xlSortNormal
'Selection.Sort Key1:=Range("c3"), Order1:=xlAscending, Header:=xlGuess, _
' OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
End Sub
Je rencontre un sérieux problème... J'avais un formule qui fesait un tri sur une colonne B3de A4: K200, en Numérique et cela fonctionnait bien.
J'ai du modifier et traiter la colonne C3 qui est Alphabétique, mais cela me fais un vide depuis A3 de plusieurs lignes sans rien dedant ?
J'ai essayé de chercher une solution comme ci dessous, mais rien ni fait... Puvez vous m'aider à touver une solution ou corriger ce VBA.
Un grand merci à toute les personnes qui aident. Fermo
Sub TriStock()
' Selectionne la première cellule du tableau
Range("A3").Select
' Boucle tant que pas vide
'nbligne = 0
'Do While Not (IsEmpty(ActiveCell))
' nbligne = nbligne + 1
' Selection.Offset(1, 0).Select
'Loop
nbligne = Range(Cells(1, 3), Cells(11, 3).End(xlDown)).Rows.Count
'Range(Cells(1, 4), Cells(11, nbligne)).Select
'Range("A4:K500").Select
'Range(Selection, Selection.End(xlToRight)).Select
'Range(Selection, Selection.End(xlDown)).Select
ActiveSheet.Unprotect
Selection.Sort Key1:=Range("c3"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
'Range("a4:k500").Select
' Selection.Sort Key1:=Range("c3"), Order1:=xlAscending, Header:=xlGuess, _
' OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
' DataOption1:=xlSortNormal
'Selection.Sort Key1:=Range("c3"), Order1:=xlAscending, Header:=xlGuess, _
' OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
End Sub