BYURAZORBACK
New Member
- Joined
- Nov 28, 2012
- Messages
- 1
I have a report that comes out daily and has a different number of rows each day. I need to have the vba code that will calculate the sum for a range of cells. The first cell should always be Q4. I have used auto fill to copy a formula down using Range("Q4:Q" & lastRow), but I'm not sure how to use that properly here. Currently I'm using: ActiveCell.FormulaR1C1 = "=SUM(R[-16]C[0]:R[-1]C[0])"
Only because 16 rows up worked the first day I created this.
Only because 16 rows up worked the first day I created this.