Suppose I've this following table:
VAR ITER_1 ITER_2 ITER_3 ITER_4
VAR1 6 8 5 7
VAR2 5 1 7 8
VAR3 3 8 8 4
VAR4 8 7 2 5
VAR5 8 7 9 2
VAR6 8 7 3 6
VAR7 4 7 4 5
I want to select combinations of Columns for each Row such that there are combinations equal to a specific sum. E.g. in this case, suppose I want for each VAR combination of ITER to be 15. In that case I want to select for VAR1
, ITER_2
& ITER_4
. For VAR2
, ITER_3
& ITER_4
.
I wanted to develop an code such that code can tell me which column values to select for each VAR.
Can anybody plz suggest some method? One don't need to write the code, but the logic I can use.
Thank you.