+ Reply to Thread
Results 1 to 3 of 3

How to get average cost of remaining (unsold) stock?

  1. #1
    Registered User
    Join Date
    05-04-2020
    Location
    India
    MS-Off Ver
    2007
    Posts
    2

    How to get average cost of remaining (unsold) stock?

    Here is my excel sheet having buying details on the left and the selling details on the right.
    A2 is the total buying average.
    I2 is the total selling average.
    E2 is the remaining Stock.
    E4 is the Cell where I need to get the desired result of average cost of remaining (unsold) stock.

    I have tried to explain it while using the data of rows 6 and 7. The average buying cost of remaining (unsold) stock.

    =((C6*(B6-H6)) + (C7*(B7-H7)))/((B6-H6)+(B7-H7))

    Is there any formula or shortcut method to get the desired result for whole of the sheet data, i.e. average cost of all remaining (unsold) stock.

    Excel Forum.png
    Attached Files Attached Files
    Last edited by unsethi; 05-07-2020 at 05:03 AM.

  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,800

    Re: How to get average cost of remaining (unsold) stock?

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however it has been brought to our attention that the same query has been posted on one or more other forums and you have not provided the required cross-post link(s) here.

    Please see Forum Rule #3 about cross-posting and adjust accordingly. Read this to understand why we (and other sites like us) consider this to be important.

    (Note: this requirement is not optional. As you are new, I shall provide it fir you this time.)

    https://chandoo.org/forum/threads/ho...d-stock.44215/

    and

    https://www.mrexcel.com/board/thread...stock.1132985/
    Last edited by alansidman; 05-04-2020 at 06:54 PM.
    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
    05-04-2020
    Location
    India
    MS-Off Ver
    2007
    Posts
    2

    Re: How to get average cost of remaining (unsold) stock?

    Answer given by chandoo.org/forum/members/peter-bartholomew.45701/ on Chandoo Excel forum.
    This post is closed now.

    If you wish to Check the answer and see the Excel attached please check on chandoo.org/forum/threads/how-to-get-average-cost-of-remaining-unsold-stock.44215/#post-263798

    = SUM( (1-sell.quantity/buy.Quantity)*buy.amount ) / SUM(buy.Quantity-sell.quantity)
    would be closer to the mark. The first sum is over the proportion remaining multiplied by the purchase cost and the second sum is the remaining stock.

    Here sell.quantity, buy.quantity, buy.amount are named range.

    If you are using anything but the latest 365 version of Excel the formula will need to be committed with CSE as an array formula. The alternative is to define a named formula e.g. averageCost to hold the formula. Any formula that is not on the grid is and always was evaluated as an array calculation.
    Last edited by unsethi; 05-07-2020 at 05:07 AM.

+ 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. Calculate cost basis of remaining shares of stock
    By fpt264 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-09-2020, 08:32 AM
  2. [SOLVED] need formula to count product sold/unsold
    By dougers1 in forum Excel General
    Replies: 3
    Last Post: 11-12-2019, 03:14 PM
  3. Trying to build Function to calculate average of stock returns, with stock prices as input
    By jameslaughlin129 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-16-2017, 05:18 PM
  4. Replies: 7
    Last Post: 09-24-2016, 06:48 PM
  5. Count remaining stock shares automatically
    By wallstudio in forum Excel General
    Replies: 3
    Last Post: 08-29-2016, 03:41 PM
  6. Replies: 0
    Last Post: 09-25-2012, 09:39 AM
  7. remaining average
    By fewchurpro in forum Excel General
    Replies: 4
    Last Post: 01-13-2010, 11:03 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