I'm receiving an error, "Run-time error '1004': Application-defined error' message on this row ' Cells(y, firstCol).Value = WorksheetFunction.Sum(Range(Cells(a - 1, firstCol), Cells(y, firstCol)))'
Do you see my syntax error?
'''''''''''''''''''''''''''''''''''''''''''''''''''''''add 0's to values for the new line inserted
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''add 0 to columns on new line and =sum() to balance row
For i = 3 To lastCol
Cells(y - 1, firstCol).Value = 0
Cells(y, firstCol).Value = WorksheetFunction.Sum(Range(Cells(a - 1, firstCol), Cells(y, firstCol)))
firstCol = firstCol + 1
iterations = iterations + 1
Next i
Do you see my syntax error?
'''''''''''''''''''''''''''''''''''''''''''''''''''''''add 0's to values for the new line inserted
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''add 0 to columns on new line and =sum() to balance row
For i = 3 To lastCol
Cells(y - 1, firstCol).Value = 0
Cells(y, firstCol).Value = WorksheetFunction.Sum(Range(Cells(a - 1, firstCol), Cells(y, firstCol)))
firstCol = firstCol + 1
iterations = iterations + 1
Next i