#1   Report Post  
Posted to microsoft.public.excel.misc
Frank Drost
 
Posts: n/a
Default very long statement

I have to create a very long formula for my cells. I hope someone can help me
with this.

I have a table, y nr of rows, x nr of columns. The numbers in the first row
of the table represents groups. In the example below, nr 1 and 2 are part of
a group, 4,5 and 6 of a second group, and 8 and 9 are part of group 3. For
each row, I have to find which group's sum is the maximum, find the maximum
value in that group, and then return the first row's corresponding position's
value. Below is an example.

A B C D E F G
1 | 1 2 4 5 6 8 9
2 | 6 7 3 4 3 1 8
3 | 2 2 1 3 9 5 1
4 | 8 4 0 9 4 1 0


So for row 2, find the maximum sum of each group: MAX(SUM(A2:B2)),
SUM(C2:E2), SUM(F2:G2)). This is the max of (13,10,9). So group one has the
largest sum (=13). Somehow the statement has to realise then that it has to
look for the maximum value in group 1, MAX(group 1). That value is then 7,
which is in the second cell of the row. Since the second cell of the row is
the location I am after, the output needs to be then the second cell of row
1, which is value nr 2.
For the third row, the story goes: Find maximum(2+2,1+3+9,5+1). The maximum
is group 2 (=13). Then find maximum in group 2, which is 9, which is cell nr
5 in that row. The equivalent position on the first row has value 6 and that
is the answer.
for row 4, max(12,13,1). Max is group 2. Max in group 2 is 9. Location is
cell 4 in tha row. Value of cell 4 in first row is 5 which is the answer.

As you can see, it needs a lot of statements. Does anyone know of a tidy way
of doing this?

ta



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
More than 3 conditional formats? Ltat42a Excel Discussion (Misc queries) 12 January 6th 06 11:26 AM
Format cells with a formula (7 conditions). danindenver Excel Discussion (Misc queries) 3 January 2nd 06 02:40 PM
Date & Time mully New Users to Excel 4 May 23rd 05 11:56 AM
Automatically up date time in a cell Mark Excel Discussion (Misc queries) 5 May 12th 05 12:26 AM
clock Wildman Excel Worksheet Functions 2 April 26th 05 10:31 AM


All times are GMT +1. The time now is 07:46 PM.

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"