Hello,
I'm just having troubles with referencing to a cell with a formula.
I currently have a formula that needs to be updated in accordance with the last cell and varying columns.
Basically, from http://www.mrexcel.com/forum/showthread.php?t=563695&page=2
I want to be able to do this without an error:
As you can see from the code, it is looping through the columns and it is trying to add up from row 8 to the last row of data like
=SUM(D8:D1234)
I'm just having troubles with referencing to a cell with a formula.
I currently have a formula that needs to be updated in accordance with the last cell and varying columns.
Basically, from http://www.mrexcel.com/forum/showthread.php?t=563695&page=2
I want to be able to do this without an error:
Code:
For j = Range("D1").Column To Range("Q1").Column
Cells(LRbal1 - 2, j).Formula = "=SUM(" & Cells(8, j) & ":" & Cells(LRbal1 - 4, j)
Next j
As you can see from the code, it is looping through the columns and it is trying to add up from row 8 to the last row of data like
=SUM(D8:D1234)