Nuclear_Dude
New Member
- Joined
- Jun 13, 2011
- Messages
- 4
I have the following data:
__24__|__48___|__120__|__125__|__208__|__240__|__250__| ...
_true | true_ | false | false | false | false | false | ...
false | false | _true | false | _true | false | false | ...
false | false | _true | false | false | _true | false | ...
false | false | false | _true | false | false | _true | ...
false | false | false | _true | false | false | false | ...
__.___|___.___|___.___|___.___|___.___|___.___|___.___| ...
__.___|___.___|___.___|___.___|___.___|___.___|___.___| ...
__.___|___.___|___.___|___.___|___.___|___.___|___.___| ...
you may have noticed that these are common voltages.
What I need is to condense the information into a single column, that reads "120" if it is a single voltage, but "120/208" or maybe "120/240", but if more than two columns are true or NO columns are true (both are possible, but not shown above), I need it to show FALSE, or ERROR, or whatever.
One way to accomplish this is with IF statement nesting, but I have 12 different voltage combinations, so that is a REALLY long if statement, and it would need a countif at the beginning to make sure there is at least one true, but not more than two. What I need done is the following:
For(A2:L2, if(cell)=true, output=output+"cell"$1)
so the first run would be in cell A2:
if(A2=true), output=output+A1+"/";
if(B2=true), output=output+B1+"/";
if(C2=true), ...
and the final output would be in the form of "###/###" or "###" or an error if there is no true or if there is more than 2 trues.
Thanks, and please let me know if you need clarification on the question. Below is my current, extremely unelegant solution:
-------
M2 = if(or(countif(A2:L2,TRUE)=1,countif(A2:L2,TRUE)=2),
if(A2,M2&$A$1,...
__24__|__48___|__120__|__125__|__208__|__240__|__250__| ...
_true | true_ | false | false | false | false | false | ...
false | false | _true | false | _true | false | false | ...
false | false | _true | false | false | _true | false | ...
false | false | false | _true | false | false | _true | ...
false | false | false | _true | false | false | false | ...
__.___|___.___|___.___|___.___|___.___|___.___|___.___| ...
__.___|___.___|___.___|___.___|___.___|___.___|___.___| ...
__.___|___.___|___.___|___.___|___.___|___.___|___.___| ...
you may have noticed that these are common voltages.
What I need is to condense the information into a single column, that reads "120" if it is a single voltage, but "120/208" or maybe "120/240", but if more than two columns are true or NO columns are true (both are possible, but not shown above), I need it to show FALSE, or ERROR, or whatever.
One way to accomplish this is with IF statement nesting, but I have 12 different voltage combinations, so that is a REALLY long if statement, and it would need a countif at the beginning to make sure there is at least one true, but not more than two. What I need done is the following:
For(A2:L2, if(cell)=true, output=output+"cell"$1)
so the first run would be in cell A2:
if(A2=true), output=output+A1+"/";
if(B2=true), output=output+B1+"/";
if(C2=true), ...
and the final output would be in the form of "###/###" or "###" or an error if there is no true or if there is more than 2 trues.
Thanks, and please let me know if you need clarification on the question. Below is my current, extremely unelegant solution:
-------
M2 = if(or(countif(A2:L2,TRUE)=1,countif(A2:L2,TRUE)=2),
if(A2,M2&$A$1,...