Sub Insertion_Fournisseur()
'
' Insertion_Fournisseur Macro
'
'
Sheets("FOURNISSEUR").Select
Rows("2:2").Select
Selection.Insert Shift:=xlDown
Selection.ClearFormats
Range("A2:K2").Select
Range("K2").Activate
With Selection
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlCenter
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Range("A2").Select
Sheets("Tableau_Insertion").Select
Range("G4:H4").Select
Selection.Copy
Sheets("FOURNISSEUR").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("B2").Select
Sheets("Tableau_Insertion").Select
Range("G5:H5").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("FOURNISSEUR").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("C2").Select
Sheets("Tableau_Insertion").Select
Range("G6:H6").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("FOURNISSEUR").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("D2").Select
Sheets("Tableau_Insertion").Select
Range("G7:H7").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("FOURNISSEUR").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("E2").Select
Sheets("Tableau_Insertion").Select
Range("G8:H8").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("FOURNISSEUR").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("F2").Select
Sheets("Tableau_Insertion").Select
Range("G9:H9").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("FOURNISSEUR").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("G2").Select
Sheets("Tableau_Insertion").Select
Range("G10:H10").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("FOURNISSEUR").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Selection.NumberFormat = "0#"" ""##"" ""##"" ""##"" ""##"
Range("H2").Select
Sheets("Tableau_Insertion").Select
Range("G11:H11").Select
Selection.Copy
Sheets("FOURNISSEUR").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Columns("H:H").ColumnWidth = 13
Application.CutCopyMode = False
Selection.NumberFormat = "0#"" ""##"" ""##"" ""##"" ""##"
Range("I2").Select
Sheets("Tableau_Insertion").Select
Range("G12:H12").Select
Selection.Copy
Sheets("FOURNISSEUR").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("J2").Select
Sheets("Tableau_Insertion").Select
Range("G13:H13").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("FOURNISSEUR").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("K2").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "=CONCATENATE(RC[-6],"" "",RC[-5])"
Range("A2:K2").Select
Range("K2").Activate
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlInsideVertical)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlInsideHorizontal)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
Columns("B:B").Select
ActiveWorkbook.Worksheets("FOURNISSEUR").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("FOURNISSEUR").Sort.SortFields.Add Key:=Range( _
"B2:B4"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
xlSortNormal
With ActiveWorkbook.Worksheets("FOURNISSEUR").Sort
.SetRange Range("A1:K4")
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Range("A2").Select
Sheets("Tableau_Insertion").Select
Range("G4:H13").Select
Selection.ClearContents
Range("G4:H4").Select
ActiveCell.FormulaR1C1 = "=NUMERO_AUTO!R[6]C[-1]"
Range("G5:H5").Select
Sheets("NUMERO_AUTO").Range("E10") = Sheets("NUMERO_AUTO").Range("E10") + 1
End Sub