T
Tempy
Good day all, i need some help modifing some code that i got of this
site to insert the total at the bottom of a column.
The code works great, i just need to format the cell with the total in
with code, making it bold and putting a single line on top and a double
line underneath and i do not know how to do it.
Sub Totals()
Dim eRow As Long
Dim fRow As Long
Dim lRow As Long
eRow = Cells(Rows.Count, 1).End(xlUp).Row
fRow = 4
Do Until lRow = eRow + 1
lRow = Cells(fRow, 10).End(xlDown).Row + 1
Cells(lRow, 10).FormulaR1C1 = _
"=SUM(R[-" & lRow - fRow & "]C:R[-1]C)"
fRow = lRow + 2
Loop
End Sub
Tempy
site to insert the total at the bottom of a column.
The code works great, i just need to format the cell with the total in
with code, making it bold and putting a single line on top and a double
line underneath and i do not know how to do it.
Sub Totals()
Dim eRow As Long
Dim fRow As Long
Dim lRow As Long
eRow = Cells(Rows.Count, 1).End(xlUp).Row
fRow = 4
Do Until lRow = eRow + 1
lRow = Cells(fRow, 10).End(xlDown).Row + 1
Cells(lRow, 10).FormulaR1C1 = _
"=SUM(R[-" & lRow - fRow & "]C:R[-1]C)"
fRow = lRow + 2
Loop
End Sub
Tempy