RawlinsCross
Active Member
- Joined
- Sep 9, 2016
- Messages
- 437
I have a named range (rYvalues) which is a singe column. It can be of variable length (7 to 365). If I want to take an average of a continuous section of that 1-dimensional named range, say average positions 50 to 99, how might I be able to do that? I've been all the web on this one and finding it hard to figure out. Can I work directly with the named range or do I have to set a new Range that is a section of the named range?
I've tried something along the lines of this:
I've tried something along the lines of this:
Code:
dAverage = Application.WorksheetFunction.Average(rYvalues.Range(Cells(50), Cells(99)))