VWAP question, with bucket limits.

kamr

New Member
Joined
Aug 4, 2011
Messages
5
Hey guys,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
<o:p> </o:p>
I have a quick problem regarding a VWAP.<o:p></o:p>
<o:p> </o:p>
An example of my spreadsheet consists of the A column, with the times, 7am-10pm, in fifteen min segments. Column B would consist of the price, corresponding to the time in column A and column C has the quantity available at that price.<o:p></o:p>
<o:p> </o:p>
But in addition to B and C, there are several more prices and (for each of those prices) sizes, expanding right to D-E, F-G, H-I, L-M etc.. pairs<o:p></o:p>
<o:p> </o:p>
What I’d like to do is get group sizes of 2,000,000 (in size terms).<o:p></o:p>
<o:p> </o:p>
So for example;<o:p></o:p>
<o:p> </o:p>
A B C D E<o:p></o:p>
At 7am -> 50 -> 750,000 -> 52 -> 5,000,000 etc…..<o:p></o:p>
<o:p> </o:p>
What I would like is a weighted average of only the first 2 million.<o:p></o:p>
<o:p> </o:p>
So to take all of the 750,000 at 50, and only 1,250,000 at 52. <o:p></o:p>
<o:p> </o:p>
It gets more complicated if C has 200,000, E has 100,000, G 3000, I 6,000,000<o:p></o:p>
<o:p> </o:p>
So you take all of C, E, G and only 1,607,000 of I.<o:p></o:p>
<o:p> </o:p>
And then its multiplying these numbers with the associated prices, and dividing by 2,000,000.<o:p></o:p>
<o:p> </o:p>
(There are more entries than just the one day (thousands), which I will use a pivot table, or otherwise I could analyse each individually, which would have been monotonous but possible, hence why I need your help)<o:p></o:p>
<o:p> </o:p>
Thanks Very very much,<o:p></o:p>
Kamr. <o:p></o:p>
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.

Forum statistics

Threads
1,224,613
Messages
6,179,903
Members
452,948
Latest member
Dupuhini

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top