How to select the last 6 entries in range with a formula?
Hi Ron,
Although I have been working with Excell and VBA for years, I am new to
ARRAY FORMULA. I will work with this and see if I can make it work for mu
application. I will try it in a macro amd may get to see how many lines I
can put in one macro. Thanks and I'll post a followup to let you know how it
works.
"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,
|