Excel Magic Trick 476: SUMPRODUCT Function for Weighted Average Cost From Transaction Data

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
9,923
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Jan 8, 2010

Calculate Weighted Average Cost from a transactional data set using SUMPRODUCT function. If you have a huge database Excel Table / List of Purchase transactions the SUMPRODUCT function makes it simple to calculate the Weighted Average Cost for all products in the data set!

  • likes, 3 dislikes

Link to this comment:

Share to:

Uploader Comments (ExcelIsFun)

  • Hi, Excel Is Fun. Do you know if there is a way to get an average time for the difference between multiple times? For example column A has start time, column B has end time, and there are various times across 100 rows, and I want the average difference of all rows. Is that possible?

  • @payasoinfeliz , really busy at work. Try:

    mrexcel [dot] com/forum

  • So what if you don't have the data arranged this way (where you have the quantity purchased at each price)? What if you have a huge database that has every registry? Is there a way to calculate the weighted average without arranging the data in this fashion?

  • I do not know how to solve that. Try THE best Excel question site:

    mrexcel[dot]com/forum

see all

All Comments (7)

Sign In or Sign Up now to post a comment!
  • Your formula is great way to go:

    =SUMPRODUCT((Col A)*(Col B),Col C)

  • Any operation on arrays of TRUEs and FALSEs converts the T/F to 1s and 0s. *, +, ^, / or even --

    The Double Negative is faster calculating. This only matters when you have huge data sets. But since it works the same I tend to teach my classes to just use the Double Negative.

    Here are 2 videos that go into great detail about this topic:

    Excel Formula Efficiency 1: SUMPRODUCT function 12 Examples

    Excel Formula Efficiency 12: Fastest Formula In Excel

  • Why not to make it as this:

    =SUMPRODUCT((Col A)*(Col B),Col C)  Then you don't need to make the DOUBLE -

    Because, how do you know that you need to add "--" ?

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more