Thread: a few condition
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Rick Rothstein \(MVP - VB\)[_375_] Rick Rothstein \(MVP - VB\)[_375_] is offline
external usenet poster
 
Posts: 1
Default a few condition

Assuming your values are always whole numbers...

=CHOOSE(1+INT((D1-1)/250),5,5,6,8,9,10,11,12)

and format the cell as Currency with zero decimal places. If you will be
copying this formula down, then you might want to modify it to handle blank
cells

=IF(D1="","",CHOOSE(1+INT((D1-1)/250),5,5,6,8,9,10,11,12))

Rick


"teratak" wrote in message
...
hi,

I am using excel 2003. I am trying to formulate a transportation cost base
on weight with a few condition.

If the total weight is equal or less than 500g the cost is $5
If the total weight is equal or less than 750g the cost is $6
If the total weight is equal or less than 1000g the cost is $8
If the total weight is equal or less than 1250g the cost is $9
If the total weight is equal or less than 1500g the cost is $10
If the total weight is equal or less than 1750g the cost is $11
If the total weight is equal or less than 2000g the cost is $12

How do I set the formula?