Finding combinations meeting criteria

tiredofit

Well-known Member
Joined
Apr 11, 2013
Messages
1,907
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
I have a row of six numbers: 100, 200, 300, 350, 80, 90.

This sums to 1120.

I would like to find all the combinations that exceed 50% of the total, ie 560.

So the result should be:

100​
200​
300​
100​
200​
350​
300​
350​
100​
300​
350​
200​
300​
350​
100​
200​
300​
350​
200​
300​
80​
100​
200​
300​
80​
200​
350​
80​
100​
200​
350​
80​
300​
350​
80​
100​
300​
350​
80​
200​
300​
350​
80​
100​
200​
300​
350​
80​
200​
300​
90​
100​
200​
300​
90​
200​
350​
90​
100​
200​
350​
90​
300​
350​
90​
100​
300​
350​
90​
200​
300​
350​
90​
100​
200​
300​
350​
90​
100​
300​
80​
90​
200​
300​
80​
90​
100​
200​
300​
80​
90​
100​
350​
80​
90​
200​
350​
80​
90​
100​
200​
350​
80​
90​
300​
350​
80​
90​
100​
300​
350​
80​
90​
200​
300​
350​
80​
90​
100​
200​
300​
350​
80​
90​

Does anybody have some VBA code to achieve this?

Thanks
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Does anybody have some VBA code to achieve this?
You don't need VBA for that
  1. You can do same with Conditional Format OR
  2. Using a helper column
whichever suits you

Better SHare data using XL2BB to help you provide better solution.
 
Upvote 0
You don't need VBA for that
  1. You can do same with Conditional Format OR
  2. Using a helper column
whichever suits you

Better SHare data using XL2BB to help you provide better solution.
Can you elaborate?

All the info you have is the 6 numbers.

The table of results I posted was computed manually.

I want to get the table of results, using VBA.
 
Upvote 0

Forum statistics

Threads
1,221,614
Messages
6,160,818
Members
451,671
Latest member
kkeller10

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