#1   Report Post  
Posted to microsoft.public.excel.misc
Ian Ian is offline
external usenet poster
 
Posts: 109
Default sum 12 numbers

I have a spreadsheet recording monthly sales over several years.

I can easily sum these and find the average sales per month but what I would
like to be able to do is find the sum or average of just the last twelve.
Again this is easy if I am prepared to edit the average formula each time I
enter a new monthly figure but I should like to automate this.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default sum 12 numbers

If your values are in column N, with the last at the bottom of the column then:

=AVERAGE(OFFSET(N1,MAX(0,COUNTA(N:N)-12),0,12,1))

If your most recent data is always inserted at the top of column N, then:

=AVERAGE(N1:N12)
--
Gary''s Student - gsnu200768


"Ian" wrote:

I have a spreadsheet recording monthly sales over several years.

I can easily sum these and find the average sales per month but what I would
like to be able to do is find the sum or average of just the last twelve.
Again this is easy if I am prepared to edit the average formula each time I
enter a new monthly figure but I should like to automate this.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 168
Default sum 12 numbers

Hi Ian,

You don't say how yout data is setup, but this process may help.

Say you have the last four years data in A2:A49.
Put this formula in B13.
=IF(A13="","",SUM(A2:A13))
Grab the fill handle and drag down to say B100

Now as you add data in A50, A51 etc. the sum of the last 12
entries will appear in B50, B51 etc.

Put the same formula in column C and use the same process
but change SUM to AVERAGE.

Adapt the process to suit your data.

HTH
Martin


"Ian" wrote in message
...
I have a spreadsheet recording monthly sales over several years.

I can easily sum these and find the average sales per month but what I
would
like to be able to do is find the sum or average of just the last twelve.
Again this is easy if I am prepared to edit the average formula each time
I
enter a new monthly figure but I should like to automate this.



  #4   Report Post  
Posted to microsoft.public.excel.misc
Ian Ian is offline
external usenet poster
 
Posts: 109
Default sum 12 numbers


Many thanks to Martin for elegant solutions that I should have been able to
think of but didn't. Thank you also to Gary's student whose reply has had me
scratching my head for some while until the penny eventually dropped. I am
grateful to you both!
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 168
Default sum 12 numbers

You're welcome Ian, thanks for posting back.
I'm sure Gary's student appreciates it as much as I do.

Regards
Martin


"Ian" wrote in message
...

Many thanks to Martin for elegant solutions that I should have been able
to
think of but didn't. Thank you also to Gary's student whose reply has had
me
scratching my head for some while until the penny eventually dropped. I
am
grateful to you both!





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel, change column of negative numbers to positive numbers? Nita New Users to Excel 3 November 27th 07 04:54 AM
Excel 2002 : Convert Positive Numbers to Negative Numbers ? Mr. Low Excel Discussion (Misc queries) 2 November 6th 06 03:30 PM
Help! How do you get excel to find the x(changes daily, marked in a cell from another formula) highest numbers in a group of numbers and sum them up? C-Man23 Excel Worksheet Functions 3 January 19th 06 09:52 AM
Help! How do you get excel to find the x(changes daily, marked in a cell from another formula) highest numbers in a group of numbers and sum them up? C-Man23 Excel Worksheet Functions 1 January 9th 06 01:23 PM
convert negative numbers to positive numbers and vice versa bill gras Excel Worksheet Functions 4 December 7th 05 01:39 AM


All times are GMT +1. The time now is 11:13 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"