Forum Discussion
thirudg
Sep 08, 2021Copper Contributor
Divide a quantity as whole number among multiple cells
Hello,
Any suggestion for an excel formula to derive A2, B2, C2, D2 values.
Eg:
Category | X | A | B | C | D |
P1 | 4 | 1 | 1 | 1 | 1 |
P2 | 3 | 0 | 1 | 1 | 1 |
P3 | 2 | 0 | 1 | 1 | 0 |
Y | 1 | 3 | 3 | 2 |
i need a formula or macro which takes into consideration of both the x and y columns values to fill the A,B ,C and D columns with 1 or 0 so that if i sum the rows and columns i will get the x and y values of the respective rows and columns .
- Juliano-PetrukioBronze ContributorWhy P2 and P3 the value for column A is "Zero". Is there any constraint?
I guess you need to provide more details so we can try to help you.
I understood that what you want is fill the adjacent columns of X values so the sum of the values of these colums (A to D) will represent the X value. But I could not understand the logic behind P2 and P3 because for instance P3 could be A=1;B=0;C=1;D=0 or A=1;B=0;C=0;D=1 resulting in 2 anyway.- thirudgCopper ContributorHi, the p3 and p2 values are zero because the values need to to sum up to the y columns aswell. So essentially i want the formula to consider the values of x rows and y columns and fill it to 1 if the two constraint is not met and even if one of the constraints fail i woul like it ro return 0
- PeterBartholomew1Silver Contributor
Solver works with evolutionary search over binary values.
Yellow = variables
Blue = constraints
Green = objective