+ Reply to Thread
Results 1 to 6 of 6

Formula to return % gain or loss

  1. #1
    Registered User
    Join Date
    09-13-2016
    Location
    Cesenatico, Italy
    MS-Off Ver
    365
    Posts
    16

    Formula to return % gain or loss

    In a table I have placed a formula to return the sales gain or loss % between one year and the other. The syntax is =IFERROR([@2016]/[@2015];"")-100%

    Unfortunately the formula returns a blank value when there is a 100% gain, although it works for all other %'s, loss or gain.

    Grateful for your help,

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Formula to return % gain or loss

    What numbers give you a blank? I set this up and when I used 100 and 50 (which is a 100% gain) I got a result of 100%. The only time you should get a blank is when the figure for 2015 is 0.

    (If 2015 is zero, then the gain is not 100%, it's undefined. You can't calculate a percent gain over zero.)
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    09-13-2016
    Location
    Cesenatico, Italy
    MS-Off Ver
    365
    Posts
    16

    Re: Formula to return % gain or loss

    Thank you 6StringJazzer

    That's exactly it, I get a blank when 2015 is zero and 2016 is greater than 0. I didn't know that it was impossible to calculate a % over zero, I thought that whatever sales figure we had in 2016 could be represented with a percentage, if compared to the result of the previous year....

  4. #4
    Registered User
    Join Date
    09-13-2016
    Location
    Cesenatico, Italy
    MS-Off Ver
    365
    Posts
    16

    Re: Formula to return % gain or loss

    Perhaps I could modify the formula to read the zero as a 0,001 so that it is not a straight zero, thereby getting a percent back?

  5. #5
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Formula to return % gain or loss

    If you look at your formula, you will see that when sales in 2015 is zero, you are trying to divide by zero, which gives an error. Your IFERROR function returns a blank in that case. It is an undefined math operation to divide by zero, so it is also an error if you try it in Excel.

    If you use a small number like 0,001 and 2016 sales are 10.000 then your percentage is going to be 10.000.000%!

    You could change your formula to use 1 instead of "" but that would be mathematically incorrect. Still, it may be what you want.

    So to answer this, you have to think about why you are showing a percentage in the first place. I don't know how you are using this information to manage the business. It might be more meaningful to show growth in euros instead of as a percentage.

  6. #6
    Registered User
    Join Date
    09-13-2016
    Location
    Cesenatico, Italy
    MS-Off Ver
    365
    Posts
    16

    Re: Formula to return % gain or loss

    6StringJazzer: thank you for feedback. I shall leave the formula as is for the time being. Very best,

+ 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 - Exchange rate gain or loss
    By Peterino in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-30-2014, 01:47 PM
  2. Formula issue capital gain loss report
    By Peterino in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 10-28-2014, 10:41 AM
  3. [SOLVED] Gain Loss report
    By Peterino in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-27-2014, 11:22 AM
  4. [SOLVED] Looking for a formula to compare weight loss or gain tracked through 3 cells
    By FIFTYFINGERS in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-19-2012, 05:06 PM
  5. Help with Formula for % gain or loss with variables
    By THTABE in forum Excel General
    Replies: 6
    Last Post: 06-15-2011, 06:17 PM
  6. Formula for gain and loss within a column with a single cell running total
    By unusually_usual in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-11-2011, 10:22 AM

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