LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Jennifer Q
 
Posts: n/a
Default Random Matrixing Problem

Thanks for your idea, but this does not give us all 1287 combinations.


"B. R.Ramachandran" wrote in
message ...
Hi,

One possibility:

In G5 enter the formula and click ENTER,

=SUM(A1:A5)

Autofill the formula across H5, I5, J5, K5, and L5, and autofill the
formulas down to the last row (e.g., G13, H13, I13, J13, K13, and L13).
These formulas calculate the running 5-row sum for each column (A thru F)
cascading down through rows.

Now, to find the maximum of these sums for each column and also the
corresponding row numbers:

In G1, enter the following formula, and autofill across H1, I1, J1, K1,
and
L1.

=MAX(G5:G13) ---- change the "13" to actual last row number.

In G2, enter the following formula, and autofill across H2, I2, J2, K2,
and
L2.

=MATCH(MAX(G$5:G$13),G$5:G$13,0)&" - "&MATCH(MAX(G$5:G$13),G$5:G$13,0)+4
--- again, change the "13"s to actual last row number.

PS: Note that these formulas work only if the data start with Row 1. If
they don't, the formulas have to be modified slightly.


Regards,
B. R. Ramachandran









"Jennifer Q" wrote:

A user posed this problem and I have no idea how to help him out. Any
suggestions or advice?

Thanks in advance for your help.

Jennifer Q

~~~~~~~
Suppose that I have a matrix that has say 13 rows and 6 columns. I wish
to
write an EXCEL program that takes 5 rows at a time and computes the sum
of
each column for the resulting matrix. The program is to record the
maximum
of these column sums along with the rows for which the computation was
made.
The program is to cycle through all 1287 possible combinations of five
rows
repeating the column sum computations and recordings as indicated above.



An example matrix is shown below:



| A | B | C | D | E | F

1 | 1 2 1 1 4 8

2 | 5 8 7 4 1 5

3 | 9 6 2 9 9 6

4 | 6 5 5 7 7 7

5 | 11 13 6 3 3 2

6 | 8 7 11 2 5 10

7 | 3 12 4 10 8 4

8 | 4 1 8 12 12 11

9 | 12 3 10 8 10 1

10| 7 9 13 13 6 3

11| 10 10 12 11 2 13

12| 2 4 9 6 13 12

13| 13 11 3 5 11 9





 
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
How to keep random number from changing using RANDBETWEEN? TXlimogirl Excel Worksheet Functions 6 April 3rd 23 04:41 PM
Non-random numbers generated by excel's data analysis random gener Allie Excel Worksheet Functions 10 September 17th 05 06:19 AM
Non-random numbers generated by excel's data analysis random gener Harlan Grove Excel Discussion (Misc queries) 2 September 13th 05 04:06 PM
Freeze Pane problem in shared workbooks JM Excel Discussion (Misc queries) 1 February 1st 05 12:04 AM
Selecting at random with weighted probability Damage Excel Worksheet Functions 2 January 31st 05 11:06 PM


All times are GMT +1. The time now is 02:23 AM.

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"