Finalfight40
Active Member
- Joined
- Apr 24, 2018
- Messages
- 273
- Office Version
- 365
- Platform
- Windows
Hi All
I am looking for a little bit of advice for a formula in VBA.
I created a macro but while testing it i noticed that this line of code was not going to be correct for all situations.
I would like it to sum from B3 to RC[-1] but of course just replacing RC[-10] with B3 would just be too easy.
Also if it matters, the formula does get copied down the column later on where B3 would then need to change to C3, D3, E3 etc.
Thank you for any advice.
I am looking for a little bit of advice for a formula in VBA.
I created a macro but while testing it i noticed that this line of code was not going to be correct for all situations.
Code:
ActiveCell.FormulaR1C1 = "=SUM(RC[-10]:RC[-1])"
I would like it to sum from B3 to RC[-1] but of course just replacing RC[-10] with B3 would just be too easy.
Also if it matters, the formula does get copied down the column later on where B3 would then need to change to C3, D3, E3 etc.
Thank you for any advice.