+ Reply to Thread
Results 1 to 10 of 10

get IF statement

  1. #1
    Registered User
    Join Date
    10-15-2007
    Posts
    11

    get IF statement

    Hei,

    I need some help, propably simple as hell for most of you, but i cannot figure it out in Excel 2007

    Please Login or Register  to view this content.
    <- this works. If purchase order is more than 1000, shipping is free, otherwise it is 20 $.

    Please Login or Register  to view this content.
    <- this doesn't work. It's basically the same as previous, but in addition i want to make sure that if client inserts nothing and the sum is 0, so the shipping would also be 0$

    How should i make myself understandable for Excel2007?
    Any help is really appreciated, like always.

    Thanks in advance

  2. #2
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326
    Try =IF(and(D18>=1000, D18<=0),0,20)

  3. #3
    Registered User
    Join Date
    10-25-2008
    Location
    Mount Joy, PA
    MS-Off Ver
    2003
    Posts
    44
    Changing the OR to an AND won't work. The Ref can never be greater than or equal to 1000 and less than or equal to 0. It is impossible

    The original formula is correct.

    Please Login or Register  to view this content.
    if d18 is less than or equal to 0 or greater than or equal to 1000, then the shipping is 0. Any value greater than 0 or less than 1000 will result in $20 shipping.

    What isn't working in the formula?

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320
    funny that it works for me

    =IF(OR(D18>=1000, D18<=0),0,20)
    0 in d18 returns 0
    >1000 in d18 returns 0
    anything else 20

  5. #5
    Registered User
    Join Date
    10-25-2008
    Location
    Mount Joy, PA
    MS-Off Ver
    2003
    Posts
    44
    A different formula that would return the same results would be:

    Please Login or Register  to view this content.

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    =IF(D18>=1000;0;20) <- this works. If purchase order is more than 1000, shipping is free, otherwise it is 20 $.

    =IF(OR(D18>=1000, D18<=0),0,20) <- this doesn't work.
    If the first formula works in your version of Excel, the second can't. Change the commas to semicolons.
    ... propably simple as hell ...
    Indeed, but skip the language, please.
    Entia non sunt multiplicanda sine necessitate

  7. #7
    Registered User
    Join Date
    10-15-2007
    Posts
    11
    Thank You all for replies.

    Tried Your suggestions, whallgren and arthurbr, Excel responds: the formula you typed contains an error.

    shg's (sorry for the language, it means nothing where i'm from) suggestion worked, but why? I could swear i tried that version, propably missed one comma or sth.

    What's with the commas and semicolons and different versions of Excel?

    Regards,

  8. #8
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320
    propably simple as hell
    er language ???? what's wrong with that?

    as for ,or ; it does depend on your region settings
    control panel/regional settings/customise/list seperator
    Last edited by martindwilson; 11-01-2008 at 06:34 PM.

  9. #9
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,481
    I tried to answer the other thread but noticed it was locked, so this is basically the same answer as everybody else
    =IF(AND(D18>0,D18<1000),20,0)

  10. #10
    Registered User
    Join Date
    10-15-2007
    Posts
    11
    Thanks

    Nice to know about the Regional Settings trick also.

    Regards

+ 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