+ Reply to Thread
Results 1 to 4 of 4

Return desired result based on a condition (to show 0% instead of #div/0)

  1. #1
    Registered User
    Join Date
    01-17-2012
    Location
    usa
    MS-Off Ver
    Excel 2007
    Posts
    40

    Return desired result based on a condition (to show 0% instead of #div/0)

    Hello,
    Well so much for being done, if any one can help with the code below, would appreciate.
    I am getting the #div/0 error again but elseware on the below code.

    =IF(H9="", "", IF(H9="0", "0%", H18/H9))

    Is there somthing I can add in here so when h18/h9 = 0 to show 0% instead of #div/0?
    Last edited by devilchild99; 01-17-2012 at 02:49 PM.

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,605

    Re: =if

    Please read and adhere to these simple rules!

    1. Use concise, accurate thread titles. Your post title should describe your problem, not your anticipated solution. Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.

    To change the title of the thread, click EDIT on the original post, then click the Go Advanced button, then change the title. If two or more hours have passed, the EDIT button will not appear, and you need to ask a moderator to change the title.

  3. #3
    Forum Expert Whizbang's Avatar
    Join Date
    08-05-2009
    Location
    Greenville, NH
    MS-Off Ver
    2010
    Posts
    1,395

    Re: Return desired result based on a condition (to show 0% instead of #div/0)

    "0" and 0 are not the same. "0" is text. 0 is a number. "0" <> 0

    =IF(H9="", "", IF(H9=0, "0%", H18/H9))

    This will also work:

    =IF(H9<>0, H18/H9,"0%")

  4. #4
    Registered User
    Join Date
    01-17-2012
    Location
    usa
    MS-Off Ver
    Excel 2007
    Posts
    40

    Re: Return desired result based on a condition (to show 0% instead of #div/0)

    Thanks, that worked perfectly. *stamps star*

+ 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