+ Reply to Thread
Results 1 to 17 of 17

Growth Formula with negative and positive amounts

  1. #1
    Registered User
    Join Date
    02-23-2016
    Location
    Bangalore
    MS-Off Ver
    2010
    Posts
    65

    Growth Formula with negative and positive amounts

    Hi,

    I am trying to create a formula which should take into account the negative and positive amounts stated in previous and current year. I have managed to create the formula to an extent, however, I am unable to do it for certain cases. These have been stated in the attachment.

    The outcome from the current formula is highlighted in yellow and the comments have been stated in the adjacent column with the iterations.

    Please help with rectifying the problem in the current formula.

    TIA
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,903

    Re: Growth Formula with negative and positive amounts

    This maybe?

    =IFERROR(IF(AND(A4=0,B4=0),0,IF(AND(B4=0,A4>0),1,IF(OR(AND(B4=0,A4<0),AND(B4>0,A4=0)),-1,(B4-A4)/B4))),"NA")
    Last edited by AliGW; 04-09-2019 at 05:38 AM.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    02-23-2016
    Location
    Bangalore
    MS-Off Ver
    2010
    Posts
    65

    Re: Growth Formula with negative and positive amounts

    Quote Originally Posted by AliGW View Post
    This maybe?

    =IFERROR(IF(AND(A4=0,B4=0),0,IF(AND(B4=0,A4>0),1,IF(OR(AND(B4=0,A4<0),AND(B4>0,A4=0)),-1,(B4-A4)/B4))),"NA")
    Thanks for this but it doesn't work in the case wherein the amount in the previous year was zero and current year is negative. it should show a de-growth of 100%.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,903

    Re: Growth Formula with negative and positive amounts

    I amended the post - please look again.

    Excel 2016 (Windows) 32 bit
    A
    B
    C
    D
    1
    Sample Data
    2
    3
    Current Year Previous Year Growth Comments
    4
    (3,714,092)
    (1,732,654)
    -114%
    This should be negative as the negative amount has increased
    5
    (2,916,964)
    (14,368)
    -20202%
    This should be negative as the negative amount has increased
    6
    (953,800)
    -
    -100%
    I would need it to have this as a de-growth and not NA since it has gone from zero to negative
    7
    (159,323)
    516,368
    131%
    Good!
    8
    -
    345,321
    -100%
    Good!
    9
    7,654,386
    -
    100%
    Good!
    10
    516,453
    (643,890)
    180%
    This should be positive growth as it went from negative to positive
    Sheet: Sheet1

  5. #5
    Registered User
    Join Date
    02-23-2016
    Location
    Bangalore
    MS-Off Ver
    2010
    Posts
    65

    Re: Growth Formula with negative and positive amounts

    Quote Originally Posted by AliGW View Post
    I amended the post - please look again.

    Excel 2016 (Windows) 32 bit
    A
    B
    C
    D
    1
    Sample Data
    2
    3
    Current Year Previous Year Growth Comments
    4
    (3,714,092)
    (1,732,654)
    -114%
    This should be negative as the negative amount has increased
    5
    (2,916,964)
    (14,368)
    -20202%
    This should be negative as the negative amount has increased
    6
    (953,800)
    -
    -100%
    I would need it to have this as a de-growth and not NA since it has gone from zero to negative
    7
    (159,323)
    516,368
    131%
    Good!
    8
    -
    345,321
    -100%
    Good!
    9
    7,654,386
    -
    100%
    Good!
    10
    516,453
    (643,890)
    180%
    This should be positive growth as it went from negative to positive
    Sheet: Sheet1
    Thanks again but now if current year is negative and previous year is positive, it shoes a growth of 131% whereas, it should be de growth as it went from positive to negative. [Row 7]

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,903

    Re: Growth Formula with negative and positive amounts

    Try this:

    =IF(OR(AND(A4=0,B4<0),AND(B4=0,A4>0)),1,IF(OR(AND(A4=0,B4>0),AND(B4=0,A4<0)),-1,IF(AND(A4<0,B4>0),-(B4-A4)/B4,(B4-A4)/B4)))

  7. #7
    Registered User
    Join Date
    02-23-2016
    Location
    Bangalore
    MS-Off Ver
    2010
    Posts
    65

    Re: Growth Formula with negative and positive amounts

    Quote Originally Posted by AliGW View Post
    Try this:

    =IF(OR(AND(A4=0,B4<0),AND(B4=0,A4>0)),1,IF(OR(AND(A4=0,B4>0),AND(B4=0,A4<0)),-1,IF(AND(A4<0,B4>0),-(B4-A4)/B4,(B4-A4)/B4)))
    Thanks and it works. However, there is one more iteration which I forgot to include and that is for both year positive number so for eg. Current year = 20,213 and previous year = 77,500, then de-growth should be -74% while the formula throws a growth of 74%. Similarly, current year = 465,348 and previous year = 25,00, then the growth should be 1761% while the formula shows -1761%.

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,903

    Re: Growth Formula with negative and positive amounts

    Just add another section to the formula to cover this.

  9. #9
    Registered User
    Join Date
    02-23-2016
    Location
    Bangalore
    MS-Off Ver
    2010
    Posts
    65

    Re: Growth Formula with negative and positive amounts

    Quote Originally Posted by AliGW View Post
    Just add another section to the formula to cover this.
    I tried with this:

    =IF(OR(AND(A11=0,B11<0),AND(B11=0,A11>0)),1,IF(OR(AND(A11=0,B11>0),AND(B11=0,A11<0)),-1,IF(OR(AND(A11>0,B11>0),AND(B11>0,A11>0)),(B11-A11)/B11,IF(AND(A11<0,B11>0),-(B11-A11)/B11,(B11-A11)/B11))))

    but didnt work out.

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,903

    Re: Growth Formula with negative and positive amounts

    Please provide a new, more complete sample dataset if you want any further input from me.

  11. #11
    Registered User
    Join Date
    02-23-2016
    Location
    Bangalore
    MS-Off Ver
    2010
    Posts
    65

    Re: Growth Formula with negative and positive amounts

    I have attached the updated sheet with the formula not working for data highlighted in orange.
    Attached Files Attached Files
    Last edited by AliGW; 04-09-2019 at 08:26 AM.

  12. #12
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,903

    Re: Growth Formula with negative and positive amounts

    Sorry - I have run out of time. Hopefully someone else will have the time to help you today.

  13. #13
    Forum Expert avk's Avatar
    Join Date
    07-12-2007
    Location
    India
    MS-Off Ver
    Microsoft Office 2013
    Posts
    3,223

    Re: Growth Formula with negative and positive amounts

    In different way : in "E4" : =A4-B4
    In "F4"
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    copy paste down.
    File attach for your ready ref.
    Attached Files Attached Files


    atul


    If my answer (or that of other members) has helped you, please say "Thanks" by clicking the Add Reputation button at the foot of one of their posts.

    Also: if your problem is solved, please take the time to mark your thread as SOLVED by going to the top of your first post, selecting "Thread Tools" and then "Mark thread as solved".

  14. #14
    Registered User
    Join Date
    02-23-2016
    Location
    Bangalore
    MS-Off Ver
    2010
    Posts
    65

    Re: Growth Formula with negative and positive amounts

    Quote Originally Posted by avk View Post
    In different way : in "E4" : =A4-B4
    In "F4"
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    copy paste down.
    File attach for your ready ref.
    Thanks for this but i need to show with + and - signs only! can use word! Can you please help me with the original formula?

  15. #15
    Registered User
    Join Date
    02-23-2016
    Location
    Bangalore
    MS-Off Ver
    2010
    Posts
    65

    Re: Growth Formula with negative and positive amounts

    Quote Originally Posted by archimaitreya View Post
    Thanks for this but i need to show with + and - signs only! can use word! Can you please help me with the original formula?
    Finally got the formula myself! Thanks all for the help!

    =IFERROR(IF(OR(AND(A4=0,B4<0),AND(B4=0,A4>0)),1,IF(OR(AND(A4=0,B4>0),AND(B4=0,A4<0)),-1,IF(AND(A4<0,B4>0),-(B4-A4)/B4,IF(AND(A4<0,B4<0),(B4-A4)/B4,IF(AND(A4>0,B4<0),(B4-A4)/B4,-(B4-A4)/B4))))),"NA")

  16. #16
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Growth Formula with negative and positive amounts

    There's no meaningful way to calculate YoY results when either period is negative. From the WSJ:

    Net Income percent change is the change from the same period from a year ago. Percent change is not provided if either the latest period or the year-ago period contains a net loss. On the digest page, if a company posts a profit in the latest period against a loss in the year-ago period, the percent change is represented as a "P". Similarly, if a company posts a loss in the latest period against a profit in the year-ago period, the percent change is represented as a "L".
    Last edited by shg; 04-09-2019 at 11:44 AM.
    Entia non sunt multiplicanda sine necessitate

  17. #17
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,903

    Re: Growth Formula with negative and positive amounts

    I had a rethink and came up with this:

    =IF((A4-B4)>0,IFERROR(ABS((B4-A4)/B4),1),-IFERROR(ABS((A4-B4)/B4),1))

    Excel 2016 (Windows) 32 bit
    A
    B
    C
    1
    Sample Data
    2
    3
    Current Year Previous Year Growth
    4
    (3,714,092)
    (1,732,654)
    -114%
    5
    (2,916,964)
    (14,368)
    -20202%
    6
    (953,800)
    -
    -100%
    7
    (159,323)
    516,368
    -131%
    8
    -
    345,321
    -100%
    9
    7,654,386
    -
    100%
    10
    516,453
    (643,890)
    180%
    11
    20,213
    77,500
    -74%
    12
    190,000
    134,500
    41%
    Sheet: Sheet1

+ 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] Sum all negative/positive amounts if maturity date is less/more than twelve months
    By Hans-Maulwurf in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-06-2018, 12:54 PM
  2. [SOLVED] matching positive/negative amounts and highlighted them
    By Jocote46 in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 04-08-2015, 11:15 AM
  3. [SOLVED] Filter and copy negative and positive amounts with rows to 2 other sheets
    By abjac in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-20-2014, 10:34 AM
  4. Replies: 6
    Last Post: 02-03-2014, 05:57 PM
  5. Convert negative to positive in sheet containing both positive/negative numbers
    By sa02000 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-29-2010, 07:52 PM
  6. Replies: 4
    Last Post: 09-26-2005, 06:05 PM
  7. [SOLVED] allocating between positive and negative amounts
    By THosier in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-07-2005, 10:06 PM

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