automatically average the last 4 columns
Biff and Mike:
Thanks for the help! You're great!
The cells should have data, if not, does it grab data from the last 4 data
points?
Also, does it matter if the data is Zero? (Not null, but 0)
Thanks again!
Greg
"T. Valko" wrote:
Assumes there will *always* be at least 4 values entered in the range and
the data is in a contiguous block (no empty cells within the range).
=AVERAGE(OFFSET(Sheet2!A5,,COUNT(Sheet2!5:5)-1,,-4))
--
Biff
Microsoft Excel MVP
"Greg" wrote in message
...
I am trying to figure out how to automatically average the last 4 columns
in
a worksheet that every week adds a column. In other words, for
"Prior4Weeks"
on Sheet1, the formula would be =AVERAGE('Sheet2'!A5:D5)
But then, a week later with another week's data summarized in a column
added
to Sheet2, the formula should read be =AVERAGE('Sheet2'!B5:E5)
I know it's gotta be a macro, but don't know where to start.
TIA,
Greg
|