+ Reply to Thread
Results 1 to 3 of 3

want to return "n/a" or "0"

  1. #1
    Registered User
    Join Date
    01-09-2004
    Location
    Palm Bay, Fl.
    Posts
    13

    Question want to return "n/a" or "0"

    Hi, I am trying to do a formula that will either return a percentage or if either of two cells are blank, then I want it to return either a "0" or "n/a". Here is my formula =(J5/H5)-100% (this gives me the recipacal of the percentage). It works fine. Now what do I add to get it to return either "0" or "n/a" if either J5 or H5 is blank or both are blank? Hope this makes sense. Background - I am trying to divide one number by another to get the percentage of the difference 8/10-100%=20% but if there are no numbers in the cells and nothing to divide, then I want it to return "0" or "n/a".

    Thanks.

  2. #2
    Registered User
    Join Date
    02-11-2005
    Posts
    85
    =IF(OR(H5="",J5=""),"N/A",(J5/H5)-100%)

    Hope it helps

  3. #3
    George Gee
    Guest

    Re: want to return "n/a" or "0"

    One way:

    =IF(OR(J5="",H5=""),"n/a",(J5/H5)-100%)

    Hope this helps.

    George Gee


    "edrachel" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi, I am trying to do a formula that will either return a percentage or
    > if either of two cells are blank, then I want it to return either a "0"
    > or "n/a". Here is my formula =(J5/H5)-100% (this gives me the
    > recipacal of the percentage). It works fine. Now what do I add to get
    > it to return either "0" or "n/a" if either J5 or H5 is blank or both are
    > blank? Hope this makes sense. Background - I am trying to divide one
    > number by another to get the percentage of the difference 8/10-100%=20%
    > but if there are no numbers in the cells and nothing to divide, then I
    > want it to return "0" or "n/a".
    >
    > Thanks.
    >
    >
    > --
    > edrachel
    > ------------------------------------------------------------------------
    > edrachel's Profile:
    > http://www.excelforum.com/member.php...fo&userid=4736
    > View this thread: http://www.excelforum.com/showthread...hreadid=505888
    >




+ 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