Excel VBA subroutine:
The Cell coordinates are determined by a couple of loops which give an x & y location for the cell in the form
Cells(x , y).
I want to calculate and enter into this cell the result of a Formula.
Basically Cell(x , y) = Cell(a , b) minus Cell(s , t)
Here's the code that's giving me the problem...
The Cell coordinates are determined by a couple of loops which give an x & y location for the cell in the form
Cells(x , y).
I want to calculate and enter into this cell the result of a Formula.
Basically Cell(x , y) = Cell(a , b) minus Cell(s , t)
Here's the code that's giving me the problem...
Code:
cells(x , y).Formula = "=sum(cells(a , b)- cells(s , t))" 'An alternative that I tried was directly accessing the worksheet, but it still didn't work Cells(x , y).Formula = "=sum(Main!H20-Main!H22)
Comment