Public Function Budget(celluleSite As Range, celluleTaille As Range, celluleNbImp As Range)
Dim sSite As String
Dim sTaille As String
Dim nNbImp As Integer
Dim refTarifs As Range
Set refTarifs = ActiveWorkbook.Worksheets(4).Range("A4:H500")
sSite = celluleSite.Text
sTaille = celluleTaille.Text
nNbImp = Val(celluleNbImp.Text)
Dim nTarif As Integer
Budget = 0
Select Case sTaille
Case "---", "0x0", "1x1"
nTarif = 0
Case "468x60"
nTarif = Application.WorksheetFunction.RECHERCHEV(celluleSite, refTarifs, 2, False)
Case "728x90"
nTarif = Application.WorksheetFunction.RECHERCHEV(celluleSite, refTarifs, 3, False)
Case "120x600"
nTarif = Application.WorksheetFunction.RECHERCHEV(celluleSite, refTarifs, 4, False)
Case "160x600"
nTarif = Application.WorksheetFunction.RECHERCHEV(celluleSite, refTarifs, 5, False)
Case "300x250"
nTarif = Application.WorksheetFunction.RECHERCHEV(celluleSite, refTarifs, 6, False)
Case "250x250"
nTarif = Application.WorksheetFunction.RECHERCHEV(celluleSite, refTarifs, 7, False)
Case Else
nTarif = 0
End Select
Budget = nTarif * nNbImp / 1000
End Function