LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 29
Default How to average the last 10 numbers in a row?

Thanks Mike for your help. Appreciate it.

"Mike H" wrote:

Just realised how you can do it without cheating by including column A in the
range

=AVERAGE(INDEX(B4:BX4,LARGE(COLUMN(B4:BX4)*(B4:BX4 <"")-1,10)):BX4)

or

=AVERAGE(INDEX(B4:BX4,LARGE(COLUMN(B4:BX4)*(B4:BX4 <0)-1,10)):BX4)

Mike




"Mike H" wrote:

Hi,

May be this

=AVERAGE(INDEX(A4:BX4,LARGE(COLUMN(A4:BX4)*(A4:BX4 <""),10)):BX4)

or this

=AVERAGE(INDEX(A4:BX4,LARGE(COLUMN(A4:BX4)*(A4:BX4 <0),10)):BX4)


This is an array formula which must be entered with CTRL+Shift+Enter and NOT
'just enter. If you do it correctly then Excel will put curly brackets around
'the formula{}. You can't type these yourself. If you Edit the ranges
'then you must re-enter as An array

Mike
Both ara array formula

"John P" wrote:

How can I write a formula to calculate the average for the last 10
positive/negative numbers in a row eg. B4:BX4 if:


1. Row B4:BX4 has both positive and negative numbers without zeros

2. Row B4:BX4 has both positive and negative numbers and may contain zeros

I have tried my best for the last 2 weeks and hope somebody can enlighten me
here. Thanks.


 
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
average a continuous group of numbers and negative numbers are 0 Dumbfounded Excel Worksheet Functions 3 October 15th 08 11:53 PM
Average highest 16 numbers on a column of 32 numbers Frank[_10_] Excel Worksheet Functions 3 May 2nd 08 02:44 AM
Average of top 3 numbers. Belzbub Excel Worksheet Functions 26 November 28th 05 11:45 PM
average of kth largest numbers in an array of n numbers georgeb Excel Worksheet Functions 6 September 5th 05 05:57 AM
Average of numbers in column between to other numbers Ditandhischeese Excel Discussion (Misc queries) 2 March 31st 05 03:35 AM


All times are GMT +1. The time now is 09:14 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"