L
Lee Jeffery
Using Excel 97 on WINNT.
I need to use VBA to find the first blank cell at the bottom of colum
G and then total the column values. I'm sure this is really basic stuf
but I'm way before basic!
I found some code which is:
Sub QuickTotals()
r = ActiveCell.CurrentRegion.Rows.Count
Set SumRow = ActiveCell.CurrentRegion.Offset(r, 0).Resize(1)
SumRow.FormulaR1C1 = "=SUM(R[" & -r & "]C:R[-1]C)"
SumRow.Offset(0, -1).Resize(1, 1).Value = "Totals"
End Sub
but this is totalling the whole range of columns. I've tried amending
few things but keep getting different sorts of Run-time errors becaus
I don't really know what I'm doing.
Could someone please steer me in the right direction?
Thank you.
Lee.:confused
I need to use VBA to find the first blank cell at the bottom of colum
G and then total the column values. I'm sure this is really basic stuf
but I'm way before basic!
I found some code which is:
Sub QuickTotals()
r = ActiveCell.CurrentRegion.Rows.Count
Set SumRow = ActiveCell.CurrentRegion.Offset(r, 0).Resize(1)
SumRow.FormulaR1C1 = "=SUM(R[" & -r & "]C:R[-1]C)"
SumRow.Offset(0, -1).Resize(1, 1).Value = "Totals"
End Sub
but this is totalling the whole range of columns. I've tried amending
few things but keep getting different sorts of Run-time errors becaus
I don't really know what I'm doing.
Could someone please steer me in the right direction?
Thank you.
Lee.:confused