Generate an array with multiple conditions

montecarlo2012

Well-known Member
Joined
Jan 26, 2011
Messages
984
Office Version
  1. 2010
Platform
  1. Windows
1662262572130.png


Hello.

My hope, is to get a list of three numbers combinations or permutations with the numbers placed at B2:F2



On A9 is the target number that generate all the conditions.

First on row 7 or [HRZ] DIFF Is the subtraction 9 – 2 = 7

And 2 – 5 = 3



Row 11 I will provide this number, this numbers will be subtract from

The target number in other words 9 – 3 = 6, 2 – 1 = 1 and abs(5 – 7)= 2

I use absolute value for all.



One of the conditions are

if you add or subtract the row 11 from 9 meaning

9 and 2 and 5 if you add or subtract 3 and 1 and 7

The 1 in the middle has to be avoid also. Is part of the differents to avoid.



Are the result I am trying to avoid

that numbers can’t be part of the list,



and 6 is not part of the row 4 or selected numbers

8 and 5 and 9 and 1 and 2 are the numbers to be in the list

In the case 9 + 3 = 12 then 12 – 10 max number has to be 9

Plus the sum can’t be equal either.

9+2+5 = 16 so if the combinations or permutation add 16 can’t be part of the list either.

So on row 17 are the example of the numbers that fit all the condition





Take me to long to do it manually.



I know is a little confusing, but I will be glad to answer any question

Thanks for reading this.
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.

Forum statistics

Threads
1,214,992
Messages
6,122,631
Members
449,095
Latest member
bsb1122

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