+ Reply to Thread
Results 1 to 4 of 4

Excel 2007 : IF function returning wrong value

  1. #1
    Registered User
    Join Date
    06-27-2011
    Location
    N/A
    MS-Off Ver
    Excel 2007
    Posts
    4

    Smile IF function returning wrong value

    I have a cell I am referencing (J24) that usually would have a number value (ex. 5%, 5, 5.0) of some sort but has N/A in it right now because I do not know the number at this time. My function is this:

    =IF(J24>=5%,1,0)

    The function is returning 1 even though the value is not >=5%, it is N/A. It should be returning 0 since it is false. This is what I want it to do.

    Please help!

  2. #2
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: IF function returning wrong value

    bdinsdale,

    Can add a check to make sure the cell contains a numeric value:
    =IF(AND(ISNUMBER(J24),J24>=0.05),1,0)

    Hope that helps,
    ~tigeravatar

  3. #3
    Registered User
    Join Date
    06-27-2011
    Location
    N/A
    MS-Off Ver
    Excel 2007
    Posts
    4

    Smile Re: IF function returning wrong value

    Yes, that helps! Thank you!

  4. #4
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: IF function returning wrong value

    Fyi, XL always considers a string larger than a number

+ 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