Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15
Default How to Calculate Average

I would like to find the AVERAGE of the last "X" alues in a column. The
columnn contains an unknown number of empty cells.

In the example below:
COL A contains the values to be averaged.
Cell B1 contains the variable "X" (3).
Cell C1 should contain the formula for, and the value of (5), the average
of the last "X" (3) values in COL A.

Anyone have any suggestions?

A B C
1 9 3 5<--- What is the formula???
2
3
4 8
5 7
6 3
7
8 5
9

Thanks,
K1NGR


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default How to Calculate Average

=AVERAGE(A100:INDEX(A1:A100,SUMPRODUCT(LARGE(ROW(1 :100)*(A1:A100<""),B1))))

--
Gary''s Student - gsnu200770
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default How to Calculate Average

Not sure if this is the best way, but it seems to work...

=AVERAGE(INDIRECT("A"&SUMPRODUCT(LARGE(ROW(A1:A100 )*(A1:A100<""),B1))&":A100"))

Change the upper range (the 100s) to your maximum anticipated row of data.

Rick


"k1ngr" wrote in message
...
I would like to find the AVERAGE of the last "X" alues in a column. The
columnn contains an unknown number of empty cells.

In the example below:
COL A contains the values to be averaged.
Cell B1 contains the variable "X" (3).
Cell C1 should contain the formula for, and the value of (5), the
average
of the last "X" (3) values in COL A.

Anyone have any suggestions?

A B C
1 9 3 5<--- What is the formula???
2
3
4 8
5 7
6 3
7
8 5
9

Thanks,
K1NGR



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15
Default How to Calculate Average

It works great!

Rick's formula does it also
(=AVERAGE(INDIRECT("A"&SUMPRODUCT(LARGE(ROW(A1:A10 0)*(A1:A100<""),B1))&":A100"))

Thanks for the help
Dick King

"Gary''s Student" wrote:

=AVERAGE(A100:INDEX(A1:A100,SUMPRODUCT(LARGE(ROW(1 :100)*(A1:A100<""),B1))))

--
Gary''s Student - gsnu200770

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15
Default How to Calculate Average

It works great!

Gary's Student's formula does it also
=AVERAGE(A100:INDEX(A1:A100,SUMPRODUCT(LARGE(ROW(1 :100)*(A1:A100<""),B1))))


Thanks for the help
Dick King

"Rick Rothstein (MVP - VB)" wrote:

Not sure if this is the best way, but it seems to work...

=AVERAGE(INDIRECT("A"&SUMPRODUCT(LARGE(ROW(A1:A100 )*(A1:A100<""),B1))&":A100"))

Change the upper range (the 100s) to your maximum anticipated row of data.

Rick


"k1ngr" wrote in message
...
I would like to find the AVERAGE of the last "X" alues in a column. The
columnn contains an unknown number of empty cells.

In the example below:
COL A contains the values to be averaged.
Cell B1 contains the variable "X" (3).
Cell C1 should contain the formula for, and the value of (5), the
average
of the last "X" (3) values in COL A.

Anyone have any suggestions?

A B C
1 9 3 5<--- What is the formula???
2
3
4 8
5 7
6 3
7
8 5
9

Thanks,
K1NGR




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
How do I calculate an average if lapark Excel Discussion (Misc queries) 2 June 27th 07 08:00 PM
Calculate average speed britgrit Excel Discussion (Misc queries) 3 May 29th 07 07:26 PM
CALCULATE WITH AVERAGE ???? [email protected] Excel Discussion (Misc queries) 1 March 18th 07 09:25 PM
If/Then calculate the average LynnJ Excel Worksheet Functions 5 January 3rd 06 10:24 PM
CALCULATE AVERAGE BETWEEN WORKSHEETS DEEKABEE Excel Discussion (Misc queries) 1 January 14th 05 01:29 AM


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