0

The "formula" =SUM(range(cells(41,10), cells(49,10))) returns "#NAME"?

I need to create the formula with quotation and & and place it in certain cells.
Also the values in the Cells() function are variables in the code.
The example is a result of one placement of the formula at a particular cell. I've tried a : also to separate the cells(), also tried not using Range().

greybeard
  • 2,102
  • 7
  • 24
  • 58
Tim
  • 1

1 Answers1

1
with Worksheets("Sheet1")
   .Range("A1").Formula = "=SUM(" & .range(.cells(41,10),.cells(49,10)).Address & ")"
End with
Scott Craner
  • 137,650
  • 9
  • 45
  • 77