Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default How to return the average of the LAST 3 numbers in a row

Hello.
I need to know if there's a way to return the average of the last 3 cells in
a row, no matter how many times values are added to the row.

Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default How to return the average of the LAST 3 numbers in a row

Assuming all of the data is numeric and there are no gaps

=AVERAGE(OFFSET(A1,0,COUNT(1:1)-3,1,3))
would return the average of the last 3 numbers in row 1.

"thorshammer" wrote:

Hello.
I need to know if there's a way to return the average of the last 3 cells in
a row, no matter how many times values are added to the row.

Thanks.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 287
Default How to return the average of the LAST 3 numbers in a row

This formula will average the last 3 numbers in row 1, even if there are
gaps. If there are less than 3 numbers it averages them all

=AVERAGE(INDEX(1:1,LARGE(IF(ISNUMBER(1:1),COLUMN(1 :1)),MIN(COUNT(1:1),3))):IV1)

This is an array formula that needs to be confirmed with CTRL+SHIFT+ENTER so
that curly braces like { and } appear around the formula in the formula bar

"JMB" wrote:

Assuming all of the data is numeric and there are no gaps

=AVERAGE(OFFSET(A1,0,COUNT(1:1)-3,1,3))
would return the average of the last 3 numbers in row 1.

"thorshammer" wrote:

Hello.
I need to know if there's a way to return the average of the last 3 cells in
a row, no matter how many times values are added to the row.

Thanks.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,836
Default How to return the average of the LAST 3 numbers in a row

Just to round things out, these will round the last three values in a COLUMN:
=AVERAGE(OFFSET(INDIRECT("A" & COUNTA(A:A)),-2,0,3))

=AVERAGE(OFFSET($A$1,COUNTA($A:$A)-3,0,3,1))

=AVERAGE(INDEX(A:A,MATCH(10^10,A:A)-2):INDEX(A:A,MATCH(10^10,A:A)))

=AVERAGE(OFFSET(A1,MATCH(9.99999999999999E+307,A:A )-3,,3))

Now, you have it both ways!!

Regards,
Ryan---


--
RyGuy


"daddylonglegs" wrote:

This formula will average the last 3 numbers in row 1, even if there are
gaps. If there are less than 3 numbers it averages them all

=AVERAGE(INDEX(1:1,LARGE(IF(ISNUMBER(1:1),COLUMN(1 :1)),MIN(COUNT(1:1),3))):IV1)

This is an array formula that needs to be confirmed with CTRL+SHIFT+ENTER so
that curly braces like { and } appear around the formula in the formula bar

"JMB" wrote:

Assuming all of the data is numeric and there are no gaps

=AVERAGE(OFFSET(A1,0,COUNT(1:1)-3,1,3))
would return the average of the last 3 numbers in row 1.

"thorshammer" wrote:

Hello.
I need to know if there's a way to return the average of the last 3 cells in
a row, no matter how many times values are added to the row.

Thanks.

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
Average highest 16 numbers on a column of 32 numbers Frank[_10_] Excel Worksheet Functions 3 May 2nd 08 02:44 AM
Array Formula to find Average Return Paul987 Excel Discussion (Misc queries) 1 May 9th 06 06:20 PM
AVERAGE Row of Numbers and Return Corresponding Numeric Label Sam via OfficeKB.com Excel Worksheet Functions 14 September 20th 05 01:07 AM
average of kth largest numbers in an array of n numbers georgeb Excel Worksheet Functions 6 September 5th 05 05:57 AM
average annual return rathersurf Excel Worksheet Functions 1 July 22nd 05 04:48 AM


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