Sub RepartitionDSP()
Dim datas, lig As Long
Application.ScreenUpdating = False
' Cette macro remplit la répartion de chaque campagne sur les différents DSP
s = 0
Dim dsp, entete As Range
Set entete = Sheets("Info").Cells.Find(what:="Vendor Name")
derL = Sheets("Info").Cells(entete.Row, entete.Column).CurrentRegion.Rows.Count - 1
For Each dsp In Sheets("Info").Range("J1:J3")
If dsp <> "" And Range("B2").Value <> "" Then
datas = Intersect([B7].CurrentRegion, Range("H:J"))
For lig = 1 To UBound(datas)
ok = datas(lig, 1) = dsp And datas(lig, 2) = dsp.Offset(, 1) And datas(lig, 3) = Range("B2").Value
If ok Then Exit For
Next lig
If Not ok Then
s = s + 1
'Vendor Name
Sheets("Info").Cells(entete.Row + derL + s, entete.Column) = dsp
'Budget
Sheets("Info").Cells(entete.Row + derL + s, entete.Column + 1) = dsp.Offset(, 1)
'Insertion Order
Sheets("Info").Cells(entete.Row + derL + s, entete.Column + 2) = Range("B2").Value
End If
End If
Next dsp
End Sub