+ Reply to Thread
Results 1 to 12 of 12

Percentage return value #DIV/0! - HELP!

  1. #1
    Registered User
    Join Date
    09-25-2012
    Location
    Dubai, UAE
    MS-Off Ver
    Excel 2003
    Posts
    11

    Percentage return value #DIV/0! - HELP!

    This sounds silly but I dont know how to get rid of this error

    I have to calculate the growth percentage

    Growth % = (B/A)-1

    A B Growth Percentage
    2 5 = 150%
    0 0 = #DIV/0!
    0 3 = #DIV/0!
    3 0 = -100%

    In example 2, the return value should be 0%
    and in example 3, the return value should be 100%

    Hope someone could help me. Appreciate it big time!
    Thanks,
    Rhea

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

    Re: Percentage return value #DIV/0! - HELP!

    And what should be result for A=5 and B=2?

  3. #3
    Registered User
    Join Date
    09-25-2012
    Location
    Dubai, UAE
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Percentage return value #DIV/0! - HELP!

    If A=5, B=2 result should be -60%

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

    Re: Percentage return value #DIV/0! - HELP!

    Then why is A=3, B=0 +100 and not -100?
    Since A=100 and B=1 would return -99%?

    Actually allway when A>B should return negative (like 3>0):

    Try this:

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    09-25-2012
    Location
    Dubai, UAE
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Percentage return value #DIV/0! - HELP!

    Example:
    The grocery shop had no sale yesterday but made $5 today. So there's a 100% growth in sales compared to previous day.

    A/B-1=Growth

    0/5-1=100% (I was required to show that if A=0 and B=with value, result should show 100%)

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

    Re: Percentage return value #DIV/0! - HELP!

    Try this:

    =IF(A1=0,--(B1=0), B1/A1-1)

    and format as %

  7. #7
    Registered User
    Join Date
    09-25-2012
    Location
    Dubai, UAE
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Percentage return value #DIV/0! - HELP!

    Brilliant!!!

    I changed from

    =IF(A1=0,--(B1=0), B1/A1-1)

    to

    =IF(A1=0,--(B1>0), B1/A1-1)

    Thank you sooo much!!! The formula really works!!!! You're a genius!!!!

  8. #8
    Registered User
    Join Date
    09-25-2012
    Location
    Dubai, UAE
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Percentage return value #DIV/0! - HELP!

    by the way Zbor

    what is the meaning of two negatives in your formula =IF(A1=0,--(B1=0), B1/A1-1) ???

    Rhea

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

    Re: Percentage return value #DIV/0! - HELP!

    One of the thing is to convert TRUE/FALSE into 1/0.

    A -TRUE is same as -1*TRUE that will give -1.
    --TRUE will give -1*-1*TRUE that will give 1.

    So if B1>0 then you'll get TRUE and --TRUE will give 1 (wich is 100% in your case).

    For more about -- you can see shg explanation here: http://www.excelforum.com/excel-gene...34#post2317734
    Last edited by zbor; 09-25-2012 at 10:06 AM.

  10. #10
    Registered User
    Join Date
    09-25-2012
    Location
    Dubai, UAE
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Percentage return value #DIV/0! - HELP!

    That solved my confusion

    Thank you Zbor!!!

    God Bless
    Last edited by rhea20; 10-09-2012 at 06:50 AM.

  11. #11
    Forum Expert icestationzbra's Avatar
    Join Date
    01-07-2004
    MS-Off Ver
    2007, 2010
    Posts
    1,421

    Re: Percentage return value #DIV/0! - HELP!

    zbor - shg, not snb. btw, thanks for sharing that link.
    - i.s.z -
    CSE, aka Array aka { }, formulae are confirmed with CONTROL+SHIFT+ENTER.
    Replace commas ( , ) with semicolons ( ; ) in formulae, if your locale setting demands.
    All good ideas are courtesy resources from this forum as well as others around the web.
    - e.o.m -

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

    Re: Percentage return value #DIV/0! - HELP!

    My mistake.. Changed

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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