Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Averaging last 25 non zero values.

Hi,

Have a dynamic list of sales values and want to make several
calculations on them, most of which I can do myself.... However, I
want to find an average of the last 25 (non-zero) values without using
a macro is this possible??

Many thanks in advance,
Peter
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Averaging last 25 non zero values.

Maybe

=AVERAGE(LARGE( SUBTOTAL(9,
OFFSET(A1:A100,LARGE(IF(A1:A100<0,ROW(A1:A100)-MIN(ROW(A1:A100))),ROW(INDIRECT("1:25"))),0,1)),{1 ,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20, 21,22,23,24,25}))

It's an array so enter with Ctrl+Shift+Enter
Works on the range A1 - A100 so change to suit.
There must be a better way so lets wait for other solutions

Mike

" wrote:

Hi,

Have a dynamic list of sales values and want to make several
calculations on them, most of which I can do myself.... However, I
want to find an average of the last 25 (non-zero) values without using
a macro is this possible??

Many thanks in advance,
Peter

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 364
Default Averaging last 25 non zero values.

wrote in message
...
Hi,

Have a dynamic list of sales values and want to make several
calculations on them, most of which I can do myself.... However, I
want to find an average of the last 25 (non-zero) values without using
a macro is this possible??

Many thanks in advance,
Peter


Here's an adaptation of one I developed some time ago. It's an array
formula, so you need to use CTRL+SHIFT+ENTER (rather than just ENTER) when
you first enter it and whenever you edit it.
=AVERAGE(OFFSET(A1,LARGE(ISNUMBER(A1:A100)*(ROW(A1 :A100)-ROW(A1)),25),0,ROWS(A1:A100)-LARGE(ISNUMBER(A1:A100)*(ROW(A1:A100)-ROW(A1)),25)))


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
Averaging without the highest or lowest values leadfoot Excel Discussion (Misc queries) 4 November 1st 07 02:51 PM
HELP: Averaging values if they meet certain criteria KellyF Excel Worksheet Functions 3 October 19th 07 02:15 PM
Averaging Values between Two Dates/Times ChrisM Excel Worksheet Functions 0 November 14th 05 03:07 PM
Averaging Values in Auto Filter Mr. Jan Park Excel Worksheet Functions 1 August 3rd 05 03:51 PM
Averaging selected values Hellion Excel Worksheet Functions 3 July 4th 05 03:29 AM


All times are GMT +1. The time now is 09:07 PM.

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

About Us

"It's about Microsoft Excel"