Villalobos
Active Member
Hello Chandoo.org,
Please, first of all let me wish to you Happy New Year!
I would like to change a formulae so that it can handle an unlimited unique values. Currently, the formulae can handle only five unique values. This is that what I have in column C (column C means = Remaining stock in the warehouse the after daily outbound deliveries):
{=IFERROR(OFFSET($C$1,LARGE(($D2=$D$1:$D1)*ROW($D$1:D1),1)-1,0)-OFFSET(E2,0,IF(OR(D2="C",D2="E"),0,1)),IF(OR(D2="A",D2="B",D2="C"),A2-B2,IF(D2="E",A2-E2,A2-E2)))}
My target is that to create a standardized formulae which is not depending on the unique values (on Sheet1), this means that somehow should standardize (or eliminate) the unique criterias which are in double quotes (IF(OR(D2="C",D2="E"),0,1)),IF(OR(D2="A",D2="B",D2="C"),A2-B2,IF(D2="E",A2-E2,A2-E2))) in the second part of the formulae.
Is it possible or not? If it is not possible then can someone recommend an alternative solution instead of the above mentioned formulae? I am complete stuck.
The sample file has been attached.
Thank you for your help!
Please, first of all let me wish to you Happy New Year!
I would like to change a formulae so that it can handle an unlimited unique values. Currently, the formulae can handle only five unique values. This is that what I have in column C (column C means = Remaining stock in the warehouse the after daily outbound deliveries):
{=IFERROR(OFFSET($C$1,LARGE(($D2=$D$1:$D1)*ROW($D$1:D1),1)-1,0)-OFFSET(E2,0,IF(OR(D2="C",D2="E"),0,1)),IF(OR(D2="A",D2="B",D2="C"),A2-B2,IF(D2="E",A2-E2,A2-E2)))}
My target is that to create a standardized formulae which is not depending on the unique values (on Sheet1), this means that somehow should standardize (or eliminate) the unique criterias which are in double quotes (IF(OR(D2="C",D2="E"),0,1)),IF(OR(D2="A",D2="B",D2="C"),A2-B2,IF(D2="E",A2-E2,A2-E2))) in the second part of the formulae.
Is it possible or not? If it is not possible then can someone recommend an alternative solution instead of the above mentioned formulae? I am complete stuck.
The sample file has been attached.
Thank you for your help!