Je connais quasi pas excel, mais peut-être en faisant macro avec des if !! On peut pas y couper car faut bien comparer.
 
Ou trouver une équation avec des poids divers genre
a * (x - 50) + b * (x - 120) + c * (x - 230) ... mais pas certain y ait une solution pour a, b, c, ....
 
function IK as single (km as integer) (je me crois en VB3) à adapter
 
if (km <= 50) then
  IK = 2.3 * km
  exit function
end if
 
if (km <= 120) then
  IK = 2.0 * km
  exit function
end if
 
if (km <= 230) then
  IK = 1.6 * km
  exit function
end if
 
if (km <= 400) then
  IK = 1.1 * km
  exit function
end if
 
IK = 0.8 * km
 
end function
 
Message édité par Carbon_14 le 21-11-2002 à 18:32:57