+ Reply to Thread
Results 1 to 3 of 3

Help with a formula (>=, <=; IF statements)

  1. #1
    Registered User
    Join Date
    10-22-2013
    Location
    New Zealand
    MS-Off Ver
    Excel 2013
    Posts
    22

    Question Help with a formula (>=, <=; IF statements)

    Hi guys,

    This formula gives me a value of 1 when I want a value 0, can someone explain why that happens?

    =IF((AND(D8>=130)),(IF(E8=0,1,E8)),0)

    where formula for D8 is =IF(D9=0,"",(ROUND(D9*100/$C8,1))) and let's say that D9 is in fact 0.

    If I change the formula for D8 and write it as =IF(D9=0,0,(ROUND(D9*100/$C8,1))), then everything works out fine.

    For some reason in the bolded formula (D8>=130) is evaluated ("">=130) as TRUE.... shouldn't it be FALSE because "" = 0 ?

    Many thanks,

    Stas

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,156

    Re: Help with a formula (>=, <=; IF statements)

    welcome to the forum, Stas. "" is actually different from the normal blanks we see in an empty cell. "" is a text & a text is regarded to be greater than numbers. on a sidenote, i don't know what's the AND for. without understanding what you need, this will give you the same results:
    =IF(D8>=130,IF(E8=0,1,E8),0)

    you do need the AND if i were to check for the "" now:
    =IF(AND(D8>=130,D8<>""),IF(E8=0,1,E8),0)

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Registered User
    Join Date
    10-22-2013
    Location
    New Zealand
    MS-Off Ver
    Excel 2013
    Posts
    22

    Re: Help with a formula (>=, <=; IF statements)

    Thanks for explaining it benishiryo, makes more sense now!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Formula Help with IF Statements
    By H57 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-10-2013, 06:11 AM
  2. IF statements formula HELP!
    By hungrytiger86 in forum Excel General
    Replies: 4
    Last Post: 08-14-2011, 03:29 PM
  3. do I have too many IF statements in formula?
    By RegLook in forum Excel General
    Replies: 1
    Last Post: 08-09-2010, 09:06 AM
  4. Replies: 12
    Last Post: 05-15-2009, 08:38 AM
  5. [SOLVED] how many if statements can you have in one formula?
    By bvehslage in forum Excel General
    Replies: 2
    Last Post: 05-17-2006, 03:10 PM

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