Here is my code . Any help would be appreciated. I'm pulling my hair out here. For c = 2 To 6 Step 1 ColumnLetter = Split(Cells(1, c).Address, "$")(1) strFormula = "=SUM(" & ColumnLetter & "2:" & ColumnLetter & (lastrow - 1) & ")" Cells(c, lastrow).Formula = strFormula Next I have also tried Cells(c,lastrow).Value = strFormula with no success
lastrow
lastrow = ' set this to the row that will contain the formulas For c = 2 To 6 Step 1 ColumnLetter = Split(Cells(1, c).Address, "$")(1) strFormula = "=SUM(" & ColumnLetter & "2:" & ColumnLetter & (lastrow - 1) & ")" Cells(lastrow, c).Formula = strFormula Next
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)