LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default How to select the last 6 entries in range with a formula?

Thanks for the help. I have already rewritten the formula for 50 players on
a 20 week schedule and this will save me much work in the future. And now I
have another tool to work with. Again, thanks.

"Ron Coderre" wrote:

Right now I'm thinking that {1,2,3,4,5,6} and (6,SUMPRODUCT...
would be the sections to change.


That's correct....those sections would look like this:
{1,2,3,4,5,6,7,8,9}
MIN(9,SUMPRODUCT

However, as the number of items you want to include increases, this
variation of the sequential list is more compact:
ROW($1:$9)..........replaces {1,2,3,4,5,6,7,8,9}

Just don't add rows above Row_1 or between rows 1 and 9.
If that's a risk, there are other techniques:
ROW(INDEX($A:$A,1):INDEX($A:$A,9))
or
ROW(INDIRECT("1:9"))

BTW.....Thanks for the feedback!
***********
Regards,
Ron

XL2002, WinXP


"Rack Pack" wrote:

Just tried it and it works like a charm. Now my only question is if I wanted
to change from the last 6 to last 9 for example, what would I change in the
formula. Right now I'm thinking that {1,2,3,4,5,6} and (6,SUMPRODUCT...
would be the sections to change. I don't think I have had enough coffee yet
this morning to really analyze it.

"Ron Coderre" wrote:

With
A2: (a name)
B2:J2 (scores with some blank cells)

This ARRAY FORMULA averages the last 6 non-blank cells and if there are less
than 6 scores, it averages the available scores:
K2:
=SUMPRODUCT(ISNUMBER(MATCH(COLUMN(B2:J2),LARGE(((B 2:J2<0)*COLUMN(B2:J2)),{1,2,3,4,5,6}),0))*B2:J2)/MIN(6,SUMPRODUCT(--(B2:J2<0)))

Note: For array formulas, hold down [Ctrl] [Shift] when you press [Enter],
instead of just pressing [Enter].

Is that something you can work with?
***********
Regards,
Ron

XL2002, WinXP


"Rack Pack" wrote:

I manage a sports league with a handicap format. Each individual may not
play each week. I need to select the last 6 entries in a row or column to
enclude in my handicap formula. As my columns are headed by the date, there
are blanks. The worksheet could be converted to rows if neccesary. Any
idesa anyone?

Thanks for any help in advance,

 
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
Select a formula / range from Excel drop down suggestions DoctorG Excel Discussion (Misc queries) 6 February 12th 10 09:14 PM
Select entries between two dates? Bob Excel Discussion (Misc queries) 4 April 8th 09 12:37 PM
Random select entries brodiemac Excel Discussion (Misc queries) 2 September 9th 06 03:01 AM
formula to select numbers from a range mark (plymouth) Excel Worksheet Functions 1 February 14th 06 05:09 PM
dynamically select a range of cells for use in a formula isofuncurves Excel Worksheet Functions 1 February 2nd 06 01:34 AM


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