Not sure how best to word this one!
I am looking to create a Macro to create multiple lines of data that add up to a certain value
10 20 30 -20 60 100
10 80 -40 -20 70 100
20 20 20 30 10 100
10 10 10 10 60 100
10 20 20 -10 60 100
-20 20 10 10 80 100
100 0 0 0 0 100
0 100 0 0 0 100
0 0 100 0 0 100
Columns 1-5 are the values, with column 6 the sum of the previous 5 columns
The criteria I need are as follows :-
5 columns each with values in them that add up to column 6 (100).
The numbers in Columns 1-5 should be multiples of 10
The numbers in Columns 1-5 should be from (-100 to 100)
I would like it to produce every possible number combination
Is there any possible way of doing this via a Macro? I have no idea how many lines of data this will produce - and i would guess it would need logic to check that it has not appeared before - could mean some amount of time number crunching. I would assume this has been done before but I have scoured the web with no solution.
Any help much appreciated,
Iain
I am looking to create a Macro to create multiple lines of data that add up to a certain value
10 20 30 -20 60 100
10 80 -40 -20 70 100
20 20 20 30 10 100
10 10 10 10 60 100
10 20 20 -10 60 100
-20 20 10 10 80 100
100 0 0 0 0 100
0 100 0 0 0 100
0 0 100 0 0 100
Columns 1-5 are the values, with column 6 the sum of the previous 5 columns
The criteria I need are as follows :-
5 columns each with values in them that add up to column 6 (100).
The numbers in Columns 1-5 should be multiples of 10
The numbers in Columns 1-5 should be from (-100 to 100)
I would like it to produce every possible number combination
Is there any possible way of doing this via a Macro? I have no idea how many lines of data this will produce - and i would guess it would need logic to check that it has not appeared before - could mean some amount of time number crunching. I would assume this has been done before but I have scoured the web with no solution.
Any help much appreciated,
Iain