Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
odey1234
 
Posts: n/a
Default calculating moving average

would like to ba able to calculate the last 3 entries of any given row. how
ever the data(score) may not be in the last three colums. EG. Four columns
A:D and Three rows 1:3

A B C D (Average)

1- 2 3 4 3

2- 2 2 2 2

3- 3 6 3 3 4

  #2   Report Post  
Jerry W. Lewis
 
Posts: n/a
Default

=AVERAGE(IF(ISNUMBER(A1:D1)*(COLUMN(A1:D1)=LARGE( IF(ISNUMBER(A1:D1),COLUMN(A1:D1)),3)),A1:D1))

Array entered (ctrl-shift-enter)

Jerry

odey1234 wrote:

would like to ba able to calculate the last 3 entries of any given row. how
ever the data(score) may not be in the last three colums. EG. Four columns
A:D and Three rows 1:3

A B C D (Average)

1- 2 3 4 3

2- 2 2 2 2

3- 3 6 3 3 4



  #3   Report Post  
Jason Morin
 
Posts: n/a
Default

One way, array-entered:

=AVERAGE(OFFSET(A1,,MATCH(9.99999999999999E+307,1: 1)-1,,-
1+LARGE(IF(1:1<"",COLUMN(1:1)),3)-MATCH
(9.99999999999999E+307,1:1)))

The above example is for row 1. Modify accordingly.

HTH
Jason
Atlanta, GA

-----Original Message-----
would like to ba able to calculate the last 3 entries of

any given row. how
ever the data(score) may not be in the last three

colums. EG. Four columns
A:D and Three rows 1:3

A B C D (Average)

1- 2 3 4 3

2- 2 2 2 2

3- 3 6 3 3 4

.

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
Moving average Mike B Excel Worksheet Functions 8 March 21st 05 04:41 PM
Plotting moving average line on a chart Herbert Chan Charts and Charting in Excel 1 February 26th 05 08:31 PM
Histrogramms: Calculating average and standard deviation Jens Eichelbaum Excel Worksheet Functions 2 November 23rd 04 02:10 AM
Calculating Average Values Using Arithmetic Equations ryangruhn Excel Worksheet Functions 2 November 3rd 04 07:22 PM
Calculating Net Position and Average Price carl Excel Worksheet Functions 6 October 31st 04 01:08 PM


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