+ Reply to Thread
Results 1 to 5 of 5

Calculating new average without factoring in prior irrelevant averages

  1. #1
    Registered User
    Join Date
    08-26-2009
    Location
    SEA
    MS-Off Ver
    Excel 2007
    Posts
    18

    Calculating new average without factoring in prior irrelevant averages

    UPDATE: I think I might have solved this on my own, but please help me check if i might have a mistake. I used the LARGE function. Please take a look at the updated excel file. Also, I think my new formula makes it a bit laggy when I was entering the data for the 'Trades' worksheet. Any suggestion to reduce the lag?





    Hello guys,

    thanks for the help for my previous post, it has been really helpful.
    However, as I examined my Excel file, I found out a bigger flaw. I've tried to solve it but to no avail. I'm gonna need your help in this one. It has to do with average and the problem is detailed in the attached file.

    The Problem is with calculating new average without factoring in prior averages that are irrelevant anymore. I need to calculate the average price that I bought my stocks at at any given time. This average keeps changing as I buy or sell stocks. At certain time, I have to disregard prior purchases/averages in the calculation of the new average price. How do I do this?

    Thanks a bunch!
    Attached Files Attached Files
    Last edited by surfol; 09-04-2010 at 04:40 PM. Reason: Changed excel files and question/request

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: How to solve this excel problem that has to do with Average

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution. Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.
    To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    08-26-2009
    Location
    SEA
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: How to solve this excel problem that has to do with Average

    Quote Originally Posted by royUK View Post
    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution. Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.
    To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.
    Title changes, sorry about that

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Calculating new average without factoring in prior irrelevant averages

    surfol, it would I think be a good idea to outline what happens in a more complex scenario, eg (same stock):

    Buy 100 shares at 50
    Buy 200 shares at 75
    Sell 175 shares
    Buy 50 shares at 90
    Sell 150 shares
    Buy 50 shares at 50
    In essence it seems you wish to operate a FIFO system in your averages (perfectly understandable).

    However, your examples don't cover the above scenario (the most complex) and though we can make [FIFO-based] assumptions as to what we think the Average prices should be for the above it would be best if you provide your expected results.
    (Where stocks are involved people often have their own preferences)

  5. #5
    Registered User
    Join Date
    08-26-2009
    Location
    SEA
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: Calculating new average without factoring in prior irrelevant averages

    Quote Originally Posted by DonkeyOte View Post
    surfol, it would I think be a good idea to outline what happens in a more complex scenario, eg (same stock):



    In essence it seems you wish to operate a FIFO system in your averages (perfectly understandable).

    However, your examples don't cover the above scenario (the most complex) and though we can make [FIFO-based] assumptions as to what we think the Average prices should be for the above it would be best if you provide your expected results.
    (Where stocks are involved people often have their own preferences)


    whew.. I completely missed that out.
    Thanks for pointing that out.
    I guess that means I still have some work to do.
    Anyone has any idea how to solve this?

    thanks

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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