A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
sure you can find a sample excel here: http://dl.dropbox.com/u/15062245/sample.xlsx
the average number of transactions for the last week is 190,099 (cells D54:D60)
but if i enter actual data for today lets say, i want it to average cells D55:D61. The formula has to be based on the last "Actual" date and count the average of the last "Actual" week.
Ok, it looks like each day starts as a forecast and then is changed to actual.
So, it looks like you want to get the average starting from the last (bottom-most) instance of actual then going up the column for a total of 7 cells.
Assuming there will always be at least 7 cells that contain actual...
=AVERAGE(OFFSET(D4,COUNTIF(A4:A500,"actual")-1,,-7))
Use a big enough range size in the COUNTIF function to allow for future data addition.
--
Biff
Microsoft Excel MVP