Finding last cell and insert line
Stopher wrote:
Sub AddFormulas2()
Range("A1").Select
Range(Selection, Selection.End(xlDown)).Select
MsgBox Selection.Count
Cells((Selection.Count + 1), 1).Select
Selection.EntireRow.Insert
ActiveCell.Range( _
"C1,F1:J1").FormulaR1C1 = "=Sum(R2C:R[-1]C)"
ActiveCell.Offset(2, 0).Select
End Sub
Try this
Having a great time of it.....take out the msgbox line as well. Was
using it to debug. On the 400 error, I'm not sure. Maybe it doesn't
like dates, I tried with just numbers in the A column, will have a look
at that now.
|