0

I am trying to count only completed components in a manufacturing shift report.

Example: I have 6 components (each having three parts) in column A represented by array constant {1,2,3,4,5,6} (in other words this column repeats three times per component - 1,1,1,2,2,2,3,3,3,4,4,4,5,5,5,6,6,6)

I have three parts per component in column B represented by array constant {"a","b","c"}. (in other words component 1 has an "a" part on one line, a "b" part on the next line and a "c" part on the third line in the shift print report.

I also have a status/ critera comment in column C represented by "Complete"

My formula trying to count only completed components (each having it's three parts) is: {=sum(countifs(A:A,{1,2,3,4,5,6},B:B,{"a","b","b"},C:C,"Complete"))}

THIS HOWEVER ONLY WORKS FOR THE FIRST THREE COMPONENTS, i.e. NOT 4,5,6.

Please help with this as my full application would be up to a hundred components each shift each with three parts that I must report as ready for despatch only when column C is "Complete".

I am doing this manually at this time which is massively numbing work.

An alternative formula I tried but which only works if A:A has one value: {=sum(if((A:A={1,2,3,4,5,6})*(B:B={"a","b","c"}),1,0))}

I am totally confounded by this one - awesomely braintwisted!

I tried looking for resources on mismatched array constants, which I thought relevant in this case but do not understand how to proceed (anyway).

Please can some one show me the light!

Thanks, Stu

1 Answer 1

2

Try transposing one (but not both) of your array constants so that it is orthogonal to the other, i.e. either:

=SUM(COUNTIFS(A:A,{1,2,3,4,5,6},B:B,{"a";"b";"c"},C:C,"Complete"))

or:

=SUM(COUNTIFS(A:A,{1;2;3;4;5;6},B:B,{"a","b","c"},C:C,"Complete"))

Note that these constructions do not require committing as array formulas, i.e. with CSE.

If you're interested in an explanation as to this required syntax, see here:

http://excelxor.com/2014/09/28/countifs-multiple-or-criteria-for-one-or-two-criteria_ranges/

Regards

Sign up to request clarification or add additional context in comments.

9 Comments

Thanks for you feedback - I am checking the reference now.
i think he meant orthogonal :)
Hi XOR LX, both formulas in your answer are the same? I still get three as the value, this is a tough one!
@Stuart Does your version of Excel use the comma or semi-colon as argument separator within functions?
"array"? No that's a new one for me too
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.