merci ergotamine !!!!
c'est nickel :)
et une question sur une macro que j'ai fait aussi.. j'ai un soucis ci dessous il me selectionne de A1, à I65..alors que moi mon nombre de lignes n'est pas fixe... tu saurais comment faire ?
Sheets("Gamme Ref JACC").Select
Range("A1:I65").Select
Application.CutCopyMode = False
ActiveSheet.ListObjects.Add(xlSrcRange, Range("$A$1:$I$65"), , xlYes).Name = _
"Tableau1"
Range("J1").Select
ActiveCell.FormulaR1C1 = "Stock vendable2"
Range("J2").Select
ActiveCell.FormulaR1C1 = "=VALUE([@[Stock vendable]])"
Range("K1").Select
ActiveCell.FormulaR1C1 = "stock total2"
Range("K2").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "=VALUE([@[Stock total]])"
Range("Tableau1[#All]").Select
Selection.Replace What:=".", Replacement:=",", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
ActiveWindow.SmallScroll Down:=-72
Range("M8").Select
ActiveWorkbook.Worksheets("Gamme Ref JACC").ListObjects("Tableau1").Sort. _
SortFields.Clear
ActiveWorkbook.Worksheets("Gamme Ref JACC").ListObjects("Tableau1").Sort. _
SortFields.Add2 Key:=Range("Tableau1[[#All],[Stock vendable2]]"), SortOn:= _
xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("Gamme Ref JACC").ListObjects("Tableau1").Sort
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Columns("F:G").Select
Selection.EntireColumn.Hidden = True
Range("Tableau1[[#Headers],[Commentaires]]").Select
ActiveCell.FormulaR1C1 = "Prix rayon"
Range("I2").Select
Columns("A:A").EntireColumn.AutoFit