Function coutimp(page, ex)
Dim plage As Range
Set plage = Sheets(4).Range("a2:i7")
nbex = 6000 - ex
If nbex > 0 Then testex = 4 Else testex = 3
coutimp = Application.WorksheetFunction.VLookup(page, plage, 2, False)
coutimp = coutimp - ((6000 - ex) / 1000) * Application.WorksheetFunction.VLookup(page, plage, testex, False)
[COLOR="Red"]With Selection
.NumberFormat = "$#,##0.00_);[Red]($#,##0.00)"
End With[/COLOR]
End Function