I have two cell addresses stored in my two variables saddr and eaddr (starting and ending cell addresses respectively)
I have to find the some of all cells in between the range and have the value assigned to another random cell. My code below throws an error. I am pretty sure i am not using the variable containing the cell addresses in the right format. Please help
Code:
saddr = Cells(x, 3).Address
eaddr = Cells(x, (3 + 6)).Address
Worksheets("Sheet2").Range("C2").Select
ActiveCell.Formula = "=Sum(Sheet1!:"&saddr&":"&eaddr&")"
The last line throws up this error. Can you tell me how to use the variable cell references correctly in the formula?