The following formal has a #value! error. I havent found the reason:
All cells in the formula are at zero when the stock market is closed. I have not yet tested the formula during market open because Im trying to finish before open. Also I want the spread sheet to work when market is closed, even though the data the formula looks at is zero. My spread sheet wont work if this formula returns this error.
I should mention that this formula came from these instructions:
Find the average price the stock traded at over the first five-minute period of the day. To do this, add the high, low, and close, then divide by three. Multiply this by the volume for that period. Record the result in a spreadsheet, under column PV.
Divide PV by the volume for that period. This will give the VWAP value.
To maintain the VWAP value throughout the day, continue to add the PV value from each period to the prior values. Divide this total by total volume up to that point. To make this easier in a spreadsheet, create columns for cumulative PV and cumulative volume. Both these cumulative values are divided by each other to produce VWAP.