Sub Macro1()
'
' Macro1 Macro
' Macro enregistrée le 09/10/2008 par IDCO1
'
' Touche de raccourci du clavier: Ctrl+Maj+W
'
Dim Variable1 As String
Dim Variable2 As Single
Dim Variable3 As String
Dim Variable4 As String
Dim Variable5 As String
Dim Variable6 As String
Dim Variable7 As String
Dim Variable8 As String
Dim x As Single
Dim i As Integer
Dim j As Integer
Dim h As Integer
With ThisWorkbook.Sheets("Paris Bercy")
If .Cells(9, 7) = "" Then
Workbooks.Open (ActiveWorkbook.Path & "\TBM ACP SRC.xls")
Set Dest = Workbooks("TBM ACP SRC.xls")
With Dest.Sheets("Détail ACP")
For i = 9 To 846 Step 27
If .Cells(i, 2) = "750670 - PARIS BERCY EXPO ACP" Then
MsgBox " 1er IF "
For j = 5 To 26 Step 1
If .Cells(i + 1, j) = "Janvier" Then
MsgBox " 2eme If "
Variable1 = .Cells(i + 8, j).Value
Variable2 = .Cells(i + 12, j).Value
Variable3 = .Cells(i + 11, j).Text
Variable4 = .Cells(i + 3, j).Text
Variable5 = .Cells(i + 14, j).Text
Variable6 = .Cells(i + 15, j).Text
Variable7 = .Cells(i + 5, j).Text
Variable8 = .Cells(i + 6, j).Text
With ThisWorkbook.Sheets("Paris Bercy")
.Cells(9, 7).Value = Variable1
x = (Variable2 * .Cells(9, 7).Value) / .Cells(5, 7).Value
.Cells(13, 7).Value = x
.Cells(30, 7).Value = Variable3
.Cells(40, 7).Value = Variable4
.Cells(42, 7).Value = Variable5
.Cells(43, 7).Value = Variable6
.Cells(45, 7).Value = Variable7
.Cells(47, 7).Value = Variable8
End With
Exit For
End If
Next
Exit For
End If
Next
End With
End If
End With
End Sub