I have the following table:
Column A - Equipment Number Column B - Level Column C-Work Column D - Type Column E - Status
11160085 C3 MECHANICS PREV OK
11160085 C3 ELECTRONICS PREV OK
11160085 B MECHANICS PREV OK
11160085 B ELECTRONICS PREV PEN
11071846 C MECHANICS CERT OK
I need to count every equipment that has status OK and type PREV. However the tricky part is that only if the equipment has status OK on both mechanics and electronics (column C) should it be counted once.
For example the count for the table above should be 1. Only equipment number 11160085 has OK for level C3 on both Mechanics and Electronics and both are type PREV. If I were to change row 2 to Status to Pen, then the count should be 0. If rows 1 through 4 had status OK, then the count should be 2.
I've tried to use SUM array formula {SUM((E2:E5="OK")*(D2:D5="PREV"))*(C2:C5="MECHANICS"))*SUM((E2:E5="OK")*(D2:D5="PREV"))*(C2:C5="ELECTRONICS"))} and it works fine if the table only had rows 1 and 2. Once I add rows 3 and 4 it does not count correctly.
Any help would be greatly appreciated.
Bookmarks