Forum Discussion

thirudg's avatar
thirudg
Copper Contributor
Sep 08, 2021

Divide a quantity as whole number among multiple cells

Hello,

Any suggestion for an excel formula to derive A2, B2, C2, D2 values.

 

Eg:

CategoryXABCD
P141111
P2 30111
P320110
Y 1332

 

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 .

  • Why 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.
    • thirudg's avatar
      thirudg
      Copper Contributor
      Hi, 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
  • thirudg 

    Solver works with evolutionary search over binary values.

    Yellow = variables

    Blue    = constraints

    Green = objective

Resources