View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Volume Weighted Average

Assume source table in A1:C9, as posted

and the dates below are in E2:E3
Date WeightedPrice
20070904
20070905


In F2:
=SUMPRODUCT(--(A$2:A$9=E2),B$2:B$9,C$2:C$9)/SUMPRODUCT(--(A$2:A$9=E2),C$2:C$9)
Copy to F3
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"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.