View Single Post
  #5   Report Post  
arno
 
Posts: n/a
Default

Hi Brenda,

User wants to combine within one formula:
If C8 < x,then C6-90
If C8 x but under xx, C6-120
If C8 xx but < xxx, C6-150
If C8 xxx, C6-180

Is there a function that will do the in-between parts for me?


lookup() will do the job for you, have a look in excel help. however,
make sure you get correct results if eg. c8=xx (exactly xx, not
smaller, not bigger).

you need a table "data" like this one
0 90
x 120
xx 150
xxx 180


then you can use
=c6-lookup(c8,data,2,TRUE)


arno