LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,651
Default formula to sum LAST five (5) values in column

On Tue, 27 Apr 2004 08:21:07 -0700, "rleonard" wrote:

I am trying to develop a formula that will sum last 5 values entered in a column of numbers.

The values are golf scores which i need to total so i can come up with an average based on last 5 games. problem is that
a person may not have a score for every date, for example:
Row a b
1 Date score
2 5/12/04 50
3 5/15/04 49
4 5/20/04 Did not play
5 5/29/04 50
6 6/01/04 45
7 6/05/04 50
8 6/10/04 Did not play
9 6/20/04 49

count(A2:A9)=6
Sum(A2:A9)=293

i need a formula that wii sum just the last 5 scores, which in this case would be 243.

Thanks for any help!
Bob Leonard


The *array-entered* formula:

=SUM(TRANSPOSE(INDIRECT(ADDRESS(
LARGE(ISNUMBER(score)*ROW(score),ROW(
INDIRECT("1:5"))),COLUMN(score)))))

To *array-enter* a formula, after typing or copying it in, hold down
<ctrl<shift while hitting <enter. XL will place braces {...} around the
formula.

In the above formula, "score" is a named range equal to B2:B9, but it can be an
single column range.

Also, if there are less than five numeric entries, the above formula will give
an error. If this is a problem, let me know.




--ron
 
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
*** Urgent help formula * Need to sum values in a column if all .. Alpha Bravo Charlie Excel Worksheet Functions 2 November 18th 07 01:11 AM
I want to copy a column of values, NOT the formula Joe G Excel Discussion (Misc queries) 2 April 20th 06 05:42 PM
AFTER REPLACING FORMULA WITH VALUES, HOW DO I ADD THE COLUMN? dyfrog Excel Discussion (Misc queries) 5 April 6th 06 07:20 PM
Move column values w/o formula Greg Excel Worksheet Functions 1 February 1st 05 10:01 PM
formula to sum LAST five (5) values in column R Doornbosch Excel Programming 0 April 27th 04 04:41 PM


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