Addition of columns with all combinations

steffin

New Member
Joined
Sep 25, 2016
Messages
6
I have lets say 20 columns with a list of 50 numbers in each column. I am trying to get the largest sum possible, by adding 2 columns with all the possible combinations.
How do I achieve that?

I am attaching a mini version of excel screenshot of what I want to achieve.
 

Attachments

  • Capture.PNG
    Capture.PNG
    61 KB · Views: 10

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Something like this?
Excel Formula:
=ADDRESS(ROW(),MATCH(LARGE($B1:$I1,COLUMN(A1)),$B1:$I1,0))&"+"&ADDRESS(ROW(),MATCH(LARGE($B1:$I1,COLUMN(A1)+1),$B1:$I1,0))
 
Upvote 0
Something like this?
Excel Formula:
=ADDRESS(ROW(),MATCH(LARGE($B1:$I1,COLUMN(A1)),$B1:$I1,0))&"+"&ADDRESS(ROW(),MATCH(LARGE($B1:$I1,COLUMN(A1)+1),$B1:$I1,0))
I tried this code, but couldn't make it work. I am not an expert. Attaching the sheet screenshot here, for better understanding.
 

Attachments

  • Capture.PNG
    Capture.PNG
    120.6 KB · Views: 3
Upvote 0
This will give you possible largest sum combinations. Try paste this formula to P3 and drag to right
Excel Formula:
=LARGE($B3:$N3,COLUMN(A1))+LARGE($B3:$N3,COLUMN(A1)+1)
 
Upvote 0
Welcome to the MrExcel Message Board!

Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at: Addition of columns with all combinations
If you have posted the question at more places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
 
Upvote 0

Forum statistics

Threads
1,214,424
Messages
6,119,404
Members
448,893
Latest member
AtariBaby

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