Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
calculate average in a column based on criteria in another column | Excel Discussion (Misc queries) | |||
Sum/average numbers in column A dependant on value in column B | Excel Worksheet Functions | |||
Need to select rows to average based on a value in a different column | New Users to Excel | |||
Column chart with additional "average" column | Charts and Charting in Excel | |||
I need to find the Average from Column A - but Reference Column B | Excel Worksheet Functions |