jeffreybrown
Well-known Member
- Joined
- Jul 28, 2004
- Messages
- 5,152
Hi All,
Not sure if you'll need to see more of the code to help answer this question. Basically I have a set of data which through a macro expands based on how many different values in another column. As the data expands subtotals are added and at the end I have a Sumif to get the overall totals. I'm having trouble understanding how to get this Sumif to be dynamic so it accomdates however big the range of data is.
Not sure if you'll need to see more of the code to help answer this question. Basically I have a set of data which through a macro expands based on how many different values in another column. As the data expands subtotals are added and at the end I have a Sumif to get the overall totals. I'm having trouble understanding how to get this Sumif to be dynamic so it accomdates however big the range of data is.
Code:
Cells(Rows.Count, "AS").End(xlUp).Offset(2).Resize(5, 5).FormulaR1C1 = "=SUMIF(R1C44:R65C44,RC44,R1C:R65C)"