1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
| Sub ImportAvisIC()
Set WSdest = Workbooks("11 Tableau de bord S48.xlsx").Worksheets("VENTE")
Set WSdep = Workbooks("11 Tableau de bord S47.xlsm").Worksheets("VENTE")
Set PlageICdep = WSdep.Range("S:S")
Macolonne = PlageICdep.Column
For Each c In PlageICdep
Maligne = c.Row
If WSdep.Cells(Maligne, Macolonne - 4).Value = "SL" Or WSdep.Cells(Maligne, Macolonne - 4).Value = "CP" Then
AvisIC = c.Value
TraitementADV = WSdep.Cells(Maligne, Macolonne + 1).Value
WSdest.Cells(Maligne, Macolonne).Value = AvisIC
WSdest.Cells(Maligne, Macolonne + 1).Value = TraitementADV
End If
If WSdep.Cells(Maligne, 1).Value = "" Then Exit For
Next
End Sub |