Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 6 of 6

Thread: Multiple "if" arguments

  1. #1
    Board Regular
    Join Date
    Mar 2002
    Location
    tucson
    Posts
    94
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I need to have a formula that calculates a total based on a sliding scale, i.e. the cost per thousand goes down as the quantity increases. If total quantity ordered is less than 2500, the cost per 1,000 is "A", 2501-5000 the cost is "B",5001-7500 the cost is "C" and 7500+, the cost is "D". Is there an easy formula for this argument?

    Thank you

  2. #2
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Austin, Texas USA
    Posts
    11,654
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Use a VLOOKUP function to determine cost/1000...


    =VLOOKUP(A2,{0,"A";2501,"B";5001,"C";7501,"D"},2)

    ...where A2 contains your Quantity.

    [ This Message was edited by: Mark W. on 2002-04-25 11:57 ]

  3. #3
    Board Regular
    Join Date
    Feb 2002
    Location
    Southfield,MI USA
    Posts
    2,312
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    You could also use a not-too-lenghy if-statment (looking at A2 for quantity):

    =(A2/1000)*(IF(A2<2500,A2*CostA,IF(A2<5000,CostB,IF(A2<7500,CostC,CostD))))

    Where CostA,CostB,CostC,and CostD are your cost values per 1000 units.

    Hope that helps,
    Adam

  4. #4
    Board Regular
    Join Date
    Mar 2002
    Location
    tucson
    Posts
    94
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Thank you Asala42. That worked brilliantly !

  5. #5
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Austin, Texas USA
    Posts
    11,654
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    On 2002-04-25 12:02, marley wrote:
    Thank you Asala42. That worked brilliantly !
    You might take another look at this formula...


    =(A2/1000)*(IF(A2<2500,A2*CostA,IF(A2<5000,CostB,IF(A2<7500,CostC,CostD))))


    Or, use...

    =A2/1000*VLOOKUP(A2,{0,CostA;2501,CostB;5001,CostC;7501,CostD},2)

    [ This Message was edited by: Mark W. on 2002-04-25 12:14 ]

  6. #6
    Board Regular
    Join Date
    Feb 2002
    Location
    Southfield,MI USA
    Posts
    2,312
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Doh!

    Good call, Mark. *slaps self*

    Adam

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •