1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
| Dim Lg&, i&
Range("I6:I100").Select
Selection.Copy
Range("B6").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Selection.PasteSpecial Paste:=xlFormats, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Range("J6:J100").Select
Application.CutCopyMode = False
Selection.Copy
Range("B106").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Selection.PasteSpecial Paste:=xlFormats, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Range("K6:K100").Select
Application.CutCopyMode = False
Selection.Copy
Range("B206").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Selection.PasteSpecial Paste:=xlFormats, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Range("L6:L100").Select
Application.CutCopyMode = False
Selection.Copy
Range("B306").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
'--- supprime espaces et lignes vides ---
Lg = Range("b" & Rows.Count).End(xlUp).Row
For i = Lg To 6 Step -1
Cells(i, "b").Value = Trim(Cells(i, "b").Value) 'espace ou apostrophe
If IsEmpty(Cells(i, "b")) Then Range("a" & i).Resize(1, 3).Delete Shift:=xlUp
Next i
'--- bordures ---
With Range("a6:c" & Lg)
.Borders(xlEdgeLeft).Weight = xlMedium
.Borders(xlEdgeTop).Weight = xlMedium
.Borders(xlEdgeBottom).Weight = xlMedium
.Borders(xlEdgeRight).Weight = xlMedium
.Borders(xlInsideVertical).Weight = xlThin
End With
Application.Goto Range("a1"), Scroll:=True
End Sub |
Partager