# Generate an array with multiple conditions

#### montecarlo2012

##### Well-known Member

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

### Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.

Replies
1
Views
106
Replies
2
Views
88
Replies
2
Views
88
Replies
1
Views
190
Replies
3
Views
97

1,181,499
Messages
5,930,271
Members
436,726
Latest member
mmhill

### 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.

### Which adblocker are you using?

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

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