LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Average of last three rows against another column

Hi all,
Scratching my head over this one....

What I want is to calculate the average of the last three values in a
column, but compared to the relating three from another column.

My current formula (which works when data is in the last three
populated cells) is as follows:
=IF(COUNTA(D2:D38)<3,0,SUM(SUM(INDEX(D2:D38,COUNTA (D2:D38)-2):INDEX(D2:D38,COUNTA(D2:D38)))-
SUM(INDEX($C$2:$C$38,COUNTA(D2:D38)-2):INDEX($C$2:$C
$38,COUNTA(D2:D38))))/3)

Example:

C
D E
10 15
10 20
20
25
30
25 35
20
30

What I'm after (effectively):
In column D, Sum(Sum(D1,D2,D4) - Sum(C1,C2,C4)) / 3
In column E, the formula I have above works perfectly as the last
three are continuous.

Any ideas ?

 
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
calculate average in a column based on criteria in another column sharon t Excel Discussion (Misc queries) 2 May 12th 06 06:07 PM
Sum/average numbers in column A dependant on value in column B Sue Excel Worksheet Functions 3 March 29th 06 06:39 PM
Need to select rows to average based on a value in a different column Randy K New Users to Excel 1 February 15th 06 01:03 AM
Column chart with additional "average" column Bill_S Charts and Charting in Excel 1 October 7th 05 10:58 PM
I need to find the Average from Column A - but Reference Column B BAM718 Excel Worksheet Functions 2 March 15th 05 02:42 PM


All times are GMT +1. The time now is 01:55 PM.

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"