Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Formula Help

For any Row:

Columns 1-24 contain whole numbers.

Column 25 contains a whole number which is less than 8, representing
the number of columns to consider when averaging values.

Column 26 contains a formula (or resulting value) indicating the
beginning column, which has the highest average value, for those
columns averaged, based on the value in column 25.

So if Column 25=5, then Column 26 would average columns 1-5, then 2-6,
then 3-7, 4-8, etc. to determine which of these averages is highest,
and indicate the beginning Column Number of that average in Column 26.

I hope I have explained this well enough for someone to help.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 913
Default Formula Help

On Wed, 22 Jul 2009 17:03:59 -0700 (PDT), iamnu
wrote:

For any Row:

Columns 1-24 contain whole numbers.

Column 25 contains a whole number which is less than 8, representing
the number of columns to consider when averaging values.

Column 26 contains a formula (or resulting value) indicating the
beginning column, which has the highest average value, for those
columns averaged, based on the value in column 25.

So if Column 25=5, then Column 26 would average columns 1-5, then 2-6,
then 3-7, 4-8, etc. to determine which of these averages is highest,
and indicate the beginning Column Number of that average in Column 26.

I hope I have explained this well enough for someone to help.


With your numbers to be averages in cells A1:X1, the number of cells
to average in cell Y1, try the following formula in cell Z1:

=MATCH(MAX(MMULT(A1:X1,TRANSPOSE(((COLUMN(OFFSET(A 1:A1,,,,24)))<
(ROW(A3:A26)))*((COLUMN(OFFSET(A1:A1,,,,24)))(ROW (A2:A25)-Y1))))),
MMULT(A1:X1,TRANSPOSE(((COLUMN(OFFSET(A1:A1,,,,24) ))<
(ROW(A3:A26)))*((COLUMN(OFFSET(A1:A1,,,,24)))(ROW (A2:A25)-Y1)))),0)+2-Y1

Note: This is an array formula that should be confirmed with
CTRL+SHIFT+ENTER rather than just ENTER.

Hope this helps / Lars-Åke
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 913
Default Formula Help

On Thu, 23 Jul 2009 07:18:04 GMT, Lars-Åke Aspelin
wrote:

On Wed, 22 Jul 2009 17:03:59 -0700 (PDT), iamnu
wrote:

For any Row:

Columns 1-24 contain whole numbers.

Column 25 contains a whole number which is less than 8, representing
the number of columns to consider when averaging values.

Column 26 contains a formula (or resulting value) indicating the
beginning column, which has the highest average value, for those
columns averaged, based on the value in column 25.

So if Column 25=5, then Column 26 would average columns 1-5, then 2-6,
then 3-7, 4-8, etc. to determine which of these averages is highest,
and indicate the beginning Column Number of that average in Column 26.

I hope I have explained this well enough for someone to help.


With your numbers to be averages in cells A1:X1, the number of cells
to average in cell Y1, try the following formula in cell Z1:

=MATCH(MAX(MMULT(A1:X1,TRANSPOSE(((COLUMN(OFFSET( A1:A1,,,,24)))<
(ROW(A3:A26)))*((COLUMN(OFFSET(A1:A1,,,,24)))(RO W(A2:A25)-Y1))))),
MMULT(A1:X1,TRANSPOSE(((COLUMN(OFFSET(A1:A1,,,,24 )))<
(ROW(A3:A26)))*((COLUMN(OFFSET(A1:A1,,,,24)))(RO W(A2:A25)-Y1)))),0)+2-Y1

Note: This is an array formula that should be confirmed with
CTRL+SHIFT+ENTER rather than just ENTER.

Hope this helps / Lars-Åke



The previously posted formula does not handle negative numbers
correctly. I hope this one will do that:

=MATCH(MAX(IF(COLUMN(A1:X1)=Y1,MMULT(A1:X1,TRANSP OSE(
((COLUMN(A1:X1))<(ROW(A2:A25)))*((COLUMN(A1:X1))( ROW(A1:A24)-Y1)))))),
IF(COLUMN(A1:X1)=Y1,MMULT(A1:X1,TRANSPOSE(((COLUM N(A1:X1))<
(ROW(A2:A25)))*((COLUMN(A1:X1))(ROW(A1:A24)-Y1))))),0)+1-Y1

Note: This is also an anrray formula that should be confirmed with
CTRL+SHIFT+ENTER rather than just ENTER.

Hope this helps / Lars-Åke
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
Regression Leverage Formula (Jerry W. Lewis or Mike Middleton)already have DFITS formula PJ[_3_] Excel Worksheet Functions 2 June 2nd 10 03:45 PM
Excel 2002 Formula: Urgent Conditional Formula Required Right Away - if possible blue[_2_] Excel Discussion (Misc queries) 2 July 11th 07 06:08 PM
copy formula down a column and have cell references change within formula brad New Users to Excel 5 May 13th 07 04:38 PM
Formula expected end of statement error, typing formula into cell as part of VBA macro [email protected] Excel Programming 1 July 20th 06 07:58 PM
Commenting custom formula fields/formula on formula editor Muxer Excel Programming 2 July 24th 03 01:02 AM


All times are GMT +1. The time now is 10:41 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"