Bonjour
Quelqu'un peut-il me simplifier cette macro,en plus il y a un beug
Sur cette ligne ( Selection.AutoFill Destination:=Range("R3:R18"), Type:=xlFillDefault)
D'avance je vous remercie
Sub Macro1()
'
' Macro1 Macro
'
'
ActiveCell.FormulaR1C1 = "=IF(RC[-1]=""X"",0,"""")"
Selection.AutoFill Destination:=Range("R3:R18"), Type:=xlFillDefault
Range("R3:R18").Select
ActiveCell.FormulaR1C1 = "=IF(RC[-1]=""X"",0,"""")"
Selection.AutoFill Destination:=Range("V3:V18"), Type:=xlFillDefault
Range("V3:V18").Select
ActiveCell.FormulaR1C1 = "=IF(RC[-1]=""X"",0,"""")"
Selection.AutoFill Destination:=Range("AA3:AA18"), Type:=xlFillDefault
Range("AA3:AA18").Select
ActiveCell.FormulaR1C1 = "=IF(RC[-1]=""X"",0,"""")"
Selection.AutoFill Destination:=Range("AE3:AE18"), Type:=xlFillDefault
Range("AE3: AE18").Select
ActiveCell.FormulaR1C1 = "=IF(RC[-1]=""X"",0,"""")"
Selection.AutoFill Destination:=Range("AJ3:AJ18"), Type:=xlFillDefault
Range("AJ3:AJ18").Select
ActiveCell.FormulaR1C1 = "=IF(RC[-1]=""X"",0,"""")"
Selection.AutoFill Destination:=Range("AN3:AN18"), Type:=xlFillDefault
Range("AN3:AN18").Select
ActiveCell.FormulaR1C1 = "=IF(RC[-1]=""X"",0,"""")"
Selection.AutoFill Destination:=Range("AS3:AS18"), Type:=xlFillDefault
Range("AS3:AS18").Select
ActiveCell.FormulaR1C1 = "=IF(RC[-1]=""X"",0,"""")"
Selection.AutoFill Destination:=Range("AW3:AW18"), Type:=xlFillDefault
Range("AW3: AW18").Select
ActiveCell.FormulaR1C1 = "=IF(RC[-1]=""X"",0,"""")"
Selection.AutoFill Destination:=Range("BB3:BB18"), Type:=xlFillDefault
Range("BB3:BB18").Select
ActiveCell.FormulaR1C1 = "=IF(RC[-1]=""X"",0,"""")"
Selection.AutoFill Destination:=Range("BF3:BF18"), Type:=xlFillDefault
Range("BF3: BF18").Select
End Sub