I have 4 columns in an excel spreadsheet where the values in each column are added up at the end of the last row. When the sheet is blank, the totals at the bottom show 0. I am trying to have a formula (possibly an IF statement) added to my current formula to make it to where the 4 cells at the bottom of the sheet show blank if the sum equals 0. I tried to use an IF statement but it errors out because I am not sure how to do it using LastRow. Any help would be greatly appreciated.
Dim aLastRow As Long
aLastRow = Cells(Cells.Rows.Count, "A").End(xlUp).Row - 3
Range("B" & aLastRow + 1).FormulaR1C1 = "=SUM(R[-" & aLastRow & "]C:R[-1]C)"
Range("E" & aLastRow + 1).FormulaR1C1 = "=SUM(R[-" & aLastRow & "]C:R[-1]C)"
Range("J" & aLastRow + 1).FormulaR1C1 = "=SUM(R[-" & aLastRow & "]C:R[-1]C)"
Range("M" & aLastRow + 1).FormulaR1C1 = "=SUM(R[-" & aLastRow & "]C:R[-1]C)"
Dim aLastRow As Long
aLastRow = Cells(Cells.Rows.Count, "A").End(xlUp).Row - 3
Range("B" & aLastRow + 1).FormulaR1C1 = "=SUM(R[-" & aLastRow & "]C:R[-1]C)"
Range("E" & aLastRow + 1).FormulaR1C1 = "=SUM(R[-" & aLastRow & "]C:R[-1]C)"
Range("J" & aLastRow + 1).FormulaR1C1 = "=SUM(R[-" & aLastRow & "]C:R[-1]C)"
Range("M" & aLastRow + 1).FormulaR1C1 = "=SUM(R[-" & aLastRow & "]C:R[-1]C)"