Lookup a column of values with the largest sum

Pille

New Member
Joined
Jun 6, 2017
Messages
15
Hi there,
Hope this post finds you well.
I need to lookup cells from one of four columns, and place them in a new column. The lookup columns are p/l columns and I'm looking for the column with the max sum. So if column b has the max sum I want all the cells from that column to show up in column x.

Kind Regards

Per
 
Sorry, correction. #16 should read A2:K1098. Otherwise the same until #20. Stupid me, type error.
/
 
Upvote 0

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.

Define Lrow in Formulas | Name Manager as referring to:

=MATCH(REPT("z",255),data!$B:$B)

Adjust the sheet name if your data lands in a different sheet.

Define Nums in Formulas | Name Manager as referring to:

=data!$D$2:INDEX(data!$K:$K,Lrow)

Define Header in the Name Manager as referring to:

=data!$D$1:$K$1
__________________________________

data (contains the data to process)

Row\Col
A​
B​
C​
D​
E​
F​
G​
H​
I​
J​
K​
1​
row counttextfield-1textfield-2X1X2X3X4X5X6X7X8
2​
1
jaddamon
1
16
4
9
3​
2
vadnate
8
3
2
1
4​
3
nadjoe
11
5
9
6
5​
4
wadjohn
6​
20​
6​
5
qadjon
15​

<tbody>
</tbody>


processing

Row\Col
A​
1​
3​
2​
5​
3​
X3
4​
4​
5​
2​
6​
9​
7​
20​
8​
15​
9​
10​
11​
12​

<tbody>
</tbody>

In A1 of processing control+shift+enter, not just enter:

=MATCH(MAX(MMULT(TRANSPOSE(Nums)+0,ROW(Nums)^0)),MMULT(TRANSPOSE(Nums)+0,ROW(Nums)^0),0)

In A2 of processing just enter:

=COUNT(INDEX(Nums,0,A1))

In A3 of processing just enter:

=INDEX(Header,A1)

In A4 of processing just enter and copy way down:

=IF(ROWS($A$4:A4)>$A$2,"",INDEX(Nums,ROWS($A$4:A4),$A$1))
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,639
Messages
6,120,679
Members
448,977
Latest member
dbonilla0331

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top