You can use this to get that average
=AVERAGE(INDEX(C11:N11,MONTH(TODAY())-2):INDEX(C11:N11,MONTH(TODAY())))
--
HTH
Bob Phillips
(remove nothere from email address if mailing direct)
"Joanne R." <JoanneR@discussions.microsoft.com> wrote in message
news:7B0ED8E8-3721-4195-9392-BC631D8D431F@microsoft.com...
> I have a spreadsheet that has the months in columns and names in rows. It
> holds historical YTD information for the people, one number for each
month.
> It also has a column that will average the months. A is the name, B is the
> average C-N equals Jan-Dec.
>
> I am building a macro that will open this file, find the name and get the
> YTD average. Easy enough. Now I need it to have it find the name and
> calculate the average of just the last three months of the data available
in
> the sheet. This of course will vary depending on when I use this file.
> Right now, data is through March, so I need Jan-Mar averaged. Next month,
I
> will need to calculate Feb-Apr.
>
> Any thoughts? Thanks in advance for your help!
Bookmarks