#VALUE! ERROR WITHOUT EXPLAINATIOIN

Iron Contributor

The following formal has a #value! error. I havent found the reason: 

 

=SUM((($AW30:$AY30)/3)*($AZ30))/($AZ30)

 

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. 

2 Replies

FOLLOW Up:

I should mention that this formula came from these instructions:

  1. 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.
  2. Divide PV by the volume for that period. This will give the VWAP value.
  3. 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.

@Greg Bonaparte , formula like

=SUM( (A1:C1)/3 )

returns #VALUE error. Use SUMPORODUCT instead

=SUMPRODUCT( ($AW30:$AY30/3)*$AZ30)/$AZ30