Closed Thread
Results 1 to 3 of 3

Need correct formula to track stock gains and losses on a daily basis

  1. #1
    Registered User
    Join Date
    01-18-2008
    Posts
    48

    Need correct formula to track stock gains and losses on a daily basis

    Hi, can someone help me with this formula for the percent change for the daily open vs the daily close for a stock

    For example, using the formula =(B2-D4)/B2 where B2 equals 16 and D4 equals 15, if the open was $16 (B2) and close was $15 (D4), you would get -6.25%, which is fine.

    Then if I change B2 to 15 and D4 to 16 and use the same formula, I get -6.7% when it should be a positive 6.7% (because the stock is going from $15 to $16). How can I make it so it would show as positive?

    In summary:

    If B2 is greater than D4 than the formula should spit out a negative value (IE 16-15/16 would equal -6.25%)
    If B2 is less than D4 than the formula should spit out a positive value (IE 15-16/15 would equal 6.67%)

    Your help is appreciated. Thanks

  2. #2
    Valued Forum Contributor janmorris's Avatar
    Join Date
    07-24-2021
    Location
    Japan
    MS-Off Ver
    Google Sheets (& Mac 2021)
    Posts
    1,072

    Re: Need correct formula to track stock gains and losses on a daily basis

    i dont know what you are doing, but when i do the first calculation it is 6.25, and second calculation is -6.67

    they are not both negatives as you are describing.

    i can of course reverse this behaviour by putting a negative in front of the formula.

  3. #3
    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
    81,250

    Re: Need correct formula to track stock gains and losses on a daily basis

    Administrative Note:

    Unfortunately, this is a duplicate thread, and you are allowed only ONE thread per issue here.

    Please see Forum Rule #5 about thread duplication.

    I am closing this thread, but you may continue here in the original thread: https://www.excelforum.com/excel-for...e-formula.html
    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.

Closed Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 0
    Last Post: 02-26-2020, 03:11 PM
  2. How to track stock movement on a monthly basis through Pivot table
    By rachelexcel1 in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 08-28-2019, 11:05 PM
  3. [SOLVED] Need help to determine monthly losses/gains.
    By beaglesBuddy in forum Excel General
    Replies: 2
    Last Post: 06-20-2013, 07:34 AM
  4. count the number of gains and losses
    By J Glanton in forum Excel General
    Replies: 2
    Last Post: 04-01-2012, 11:34 AM
  5. Graphing Gains and Losses of Personnel
    By BusDriver2 in forum Excel General
    Replies: 7
    Last Post: 04-17-2009, 10:48 AM
  6. making gains or losses appear red or black in formula
    By Blane in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-04-2006, 09:10 PM
  7. gains/losses formulas
    By kgeorge in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-24-2006, 05:25 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