PC Review


Reply
Thread Tools Rate Thread

Averaging last 25 non zero values.

 
 
peterv@caddypro.co.uk
Guest
Posts: n/a
 
      10th Dec 2007
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
 
Reply With Quote
 
 
 
 
Mike H
Guest
Posts: n/a
 
      10th Dec 2007
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

"(E-Mail Removed)" 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
>

 
Reply With Quote
 
Stephen
Guest
Posts: n/a
 
      10th Dec 2007
<(E-Mail Removed)> wrote in message
news:b3eceb8b-e61a-4ed9-804a-(E-Mail Removed)...
> 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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Averaging Negative Values Pete_UK Microsoft Excel Discussion 0 24th Aug 2010 04:06 PM
Averaging unique values DamienO Microsoft Excel Misc 2 14th Apr 2010 09:53 AM
Averaging values RUSH2CROCHET Microsoft Excel Misc 1 27th Oct 2009 06:20 PM
averaging less than values JD Microsoft Excel New Users 1 10th Sep 2008 04:28 AM
averaging less than values JD Microsoft Excel New Users 4 28th Aug 2008 07:42 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:26 AM.