+ Reply to Thread
Results 1 to 9 of 9

Weighted Average Help

  1. #1
    Registered User
    Join Date
    08-24-2012
    Location
    NYC
    MS-Off Ver
    Excel 2010
    Posts
    6

    Weighted Average Help

    Hello,

    I'm having trouble with a daily weighted average calculation. Essentially, I have three columns: Date, Price, and Trade Amount. My task is to calculated a daily weighted average price based on the trade amount. The problem I have is that the number of trades each day is not consistent from day to day, so a straightforward calculation isn't working. Can anyone give me a hand?

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Weighted Average Help

    Does the attached help?
    Attached Files Attached Files
    Last edited by Richard Buttrey; 08-27-2012 at 11:19 AM.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Contributor
    Join Date
    08-01-2012
    Location
    Chicago
    MS-Off Ver
    Excel 2010
    Posts
    112

    Re: Weighted Average Help

    Try creating a new column that puts the trade amount out of 100.
    So assuming trade amount is in column C. =C1/Sum($C$1:$C$1000)
    1000 would depend on the maximum expected trades. Or you could do the whole column.

    Then do a sumproduct of the new column and the Price column.

    Was that what you were looking for?

  4. #4
    Registered User
    Join Date
    08-24-2012
    Location
    NYC
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Weighted Average Help

    Thanks for the replies.

    Richard, so that does a weighted average calculation for a single day, but I have three years worth of data and don't want to do that calculation by hand for each day. Do you have any suggestions?

    AJM, I need to do a weighted average calculation for each day, not a single weighted average of all three years of trade data.

  5. #5
    Forum Contributor
    Join Date
    08-01-2012
    Location
    Chicago
    MS-Off Ver
    Excel 2010
    Posts
    112

    Re: Weighted Average Help

    if all your data is in one worksheet you could do a vlookup by date. Have each date be a separate column and then modify the calc to give the answer at the bottom of the column

  6. #6
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Weighted Average Help

    Quote Originally Posted by pink gorillas View Post
    Thanks for the replies.

    Richard, so that does a weighted average calculation for a single day, but I have three years worth of data and don't want to do that calculation by hand for each day. Do you have any suggestions?
    Hi,
    I thought you were wanting a weighted average per day?
    Did you see my edited post where I'd changed the attachment to give you a weighted average.

    I don't understand your fear that you will have to do the calc 'by hand each day'. It's just two formulae which you copy down a list of dates.
    If you want a list of dates just create the first one and in the next cell put in =A1+1 and copy it down for 365 (days) x 3 (years) rows.

  7. #7
    Registered User
    Join Date
    08-24-2012
    Location
    NYC
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Weighted Average Help

    Richard, I didn't see that you had updated the excel file. That was precisely what I needed. Thanks very much, I appreciate it.

  8. #8
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Weighted Average Help

    @ pink gorillas

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. I'll do that for you now but please keep in mind for your future threads that Rule #9 requires you to do that yourself. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, as a new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

  9. #9
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Weighted Average Help

    See the file

    with pivot table.

    gemiddelde = avarage
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

+ 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