+ Reply to Thread
Results 1 to 5 of 5

Multiple IF Statement not working.

  1. #1
    Registered User
    Join Date
    12-13-2012
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    7

    Multiple IF Statement not working.

    Okay, so basically if C18 says Y, then it needs to multiply the order qty by .02 ($20 per 1000). it needs a minimum of $15, but after the first $20 it needs to round up to the nearest $20. So since the formula didn't like rounding up WITH the $15 minimum, I figured if I set it to round up to the nearest 20 ONLY if the order qty is 1000 or over, it would solve the problem, but now I"m getting a Value error, and I'm not sure how to fix it.
    Can anyone help?

    =IF(C18="Y",MAX(15,(PRODUCT(H6,0.02))),0),IF(H6=">1000",ROUNDUP(PRODUCT(H6,0.02)/20,0)*20)

    Thanks

  2. #2
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Multiple IF Statement not working.

    Try this..

    Please Login or Register  to view this content.
    EDIT: edited formula above, should read as CEILING(H6*0.02,20) instead of the CEILING(H6*0.02,5)
    Last edited by Ace_XL; 12-17-2012 at 04:53 PM.
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: Multiple IF Statement not working.

    your if() statement anctuall ends here...
    =IF(C18="Y",MAX(15,(PRODUCT(H6,0.02))),0) - the rest is error
    =IF(C18="Y",MAX(15,(PRODUCT(H6,0.02))),0) ,IF(H6=">1000",ROUNDUP(PRODUCT(H6,0.02)/20,0)*20)

    not sure what you are trying to do, but maybe you need another if()?

    and just out of curiosity, why are you using PRODUCT(H6,0.02), when (i think) you could just use H6*0.02)?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Registered User
    Join Date
    12-13-2012
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Multiple IF Statement not working.

    Almost, but it's not rounding up to the next $20 anymore.

  5. #5
    Registered User
    Join Date
    12-13-2012
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Multiple IF Statement not working.

    Ace, it's perfect, thank you!


    FDibbins, honestly? Excel isn't my forte. I'm just trying to put together what I thought was going to be a simple quote sheet for my boss, but it's proving to be more difficult than I anticipated. Everything I've learned I've figured out on my own.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1