Bonjour,

Peut-on simplifier la macro ?

Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
Sub Macro2()
'
' Macro2 Macro
'
 
'
    Columns("AK:AK").Select
    Selection.Insert Shift:=xlToRight
    Selection.Insert Shift:=xlToRight
    Columns("AK:AL").Select
    Range("AL1").Activate
    Selection.NumberFormat = "m/d/yyyy"
    Range("AK2").Select
    ActiveCell.FormulaR1C1 = _
        "=VLOOKUP(RC[-8],'[bidule.xlsx]BAL'!R2C28:R1904C30,3,FALSE)"
    Range("AK2").Select
    Selection.AutoFill Destination:=Range("AK2:AK1895")
    Range("AK2:AK1895").Select
    Range("AL2").Select
    ActiveCell.FormulaR1C1 = _
        "=VLOOKUP(RC[-9],'[bidule.xlsx]BAL'!R2C28:R1904C31,4,FALSE)"
    Range("AL2").Select
    Selection.AutoFill Destination:=Range("AL2:AL1895")
    Range("AL2:AL1895").Select
    Range("AK2").Select
End Sub