Bass71
MIS
- Jun 21, 2001
- 79
Hello
In Excel VB, I'm trying to sum the numbers in a column which, depending on previous macros run, the row count will vary. The column has some blanks. I thought I'd try to Dim the row address variable and enter that into my formula:
Dim k as integer
ActiveCell.Value = ActiveCell.Address 'Already at end
ActiveCell(2, 1).Value = Right(ActiveCell.Value, 4)
k = ActiveCell(2, 1).Value - 2 'I thought I could plug this
' into formula
ActiveCell.Formula = "=SUM(R[-k]C:R[-1]C)"
Thanks..............RO
In Excel VB, I'm trying to sum the numbers in a column which, depending on previous macros run, the row count will vary. The column has some blanks. I thought I'd try to Dim the row address variable and enter that into my formula:
Dim k as integer
ActiveCell.Value = ActiveCell.Address 'Already at end
ActiveCell(2, 1).Value = Right(ActiveCell.Value, 4)
k = ActiveCell(2, 1).Value - 2 'I thought I could plug this
' into formula
ActiveCell.Formula = "=SUM(R[-k]C:R[-1]C)"
Thanks..............RO