Thread: Excel SUM Bug?
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.setup
Richard K Richard K is offline
external usenet poster
 
Posts: 6
Default Excel SUM Bug?

OK, I partially take back what I just said. When I add in the "SUM" part to
the formula via the vbscript it still doesn't work. I actually went to the
cell and now took out the "SUM" part (basically taking it back to the way I
had it before for Excel 2003) and it calculated correctly. Is something
screwed up between vbscript and Excel when putting in the formula? This is
very weird and causing me major headaches.

"Richard K" wrote:

OK, something is going on here in Excel 2007 vs. 2003. I have a cell with a
formula in it that was coded in vbscript: ActiveCell.FormulaR1C1 =
"=(R[0]C[-4]+R[1]C[-4])*R[+1]C[2]" When I run this in Excel 2003 or 2007 it
puts the formula in effectively as something like "=(A12+A13)*G13".

In Excel 2003 it calculates the value of the cell correctly. When I run
this in Excel 2007 it puts a big fat 0 in the cell which I can see is wrong
based on the contents of A12, A13 and G13. I need to change the formula to
"=SUM((A12+A13)*G13)" for Excel 2007 to work.

What's going on here?

Thanks!

-Richard K