View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JE McGimpsey JE McGimpsey is offline
external usenet poster
 
Posts: 4,624
Default Volume Weighted Average

One way:

Assuming that your data table is in J:K and your summary table in A:B:

=SUMPRODUCT(--($J$2:$J$1000=A2), $K$2:$K$1000, $L$2:$L$1000) /
SUMIF($J$2:$J$2000, A2, $L$2:$L$1000)

In article ,
carl wrote:

My data table looks like this:

Date Price Volume
20070904 17.3 10
20070904 17.3 10
20070904 23.8 5
20070904 23.8 5
20070905 5.7 10
20070905 5.7 10
20070905 1.55 11
20070905 1.55 11

I am looking for a formula for this table

Date WeightedPrice
20070904
20070905

So for each day, calculate the volume weighted average price.

Thank you in advance.