Re : Macro sans fin
Bonjour suistrop et autre forum contributor
Voici un fichier d'exemple.
Il était trop lourd donc j'ai enlevé les macros, que vous retrouverez si dessous.
La macro qui Call "Apl_Besoin" est "Reporting_projet".
Merci d'avance.
Sub Reporting_projets()
Call Apl_Besoin
Call Apl_Affectations
End Sub
Sub Apl_Besoin()
'
' Apl_Besoin Macro
'
'
'
Range("B86:AE115").Select
Selection.Copy
Sheets("feuil2").Select
Range("A1").Select
ActiveSheet.Paste
nb = 24
For f = 3 To nb
Columns(2 * f).Insert
Next
Dim Li As Long
Dim i As Byte
i = Range("IV1").End(xlToLeft).Column
For Li = 2 To i
Cells(1, 2 * Li + 1).Select
If Cells(1, 2 * Li + 1) = "" Then
End
End If
If Cells(1, 2 * Li + 1) <> "" Then
Selection.Copy
ActiveCell.Offset(0, 1).Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
ActiveCell.Select
ActiveCell.Replace What:="Besoin", Replacement:="Affecté", LookAt:=xlPart _
, SearchOrder:=xlByRows, MatchCase:=False
End If
Next
Range("A1").Select
End Sub
Sub Apl_Affectations()
'
' Apl_Besoin Macro
' Macro enregistrée le 04/03/2009 par EDF-GDF
Range("B2").Select
End Sub