Log in

View Full Version : Count a criteria based on a second


rsdjimbie
Feb 28, 2010, 12:45 PM
Please refer attachment.

I need to count a criteria based on a second.

For sheets "Adjustments" cells "B16" should count "IF" sheets "Prod A-Prod D" columns "C:C"="Charge hand" and columns "X:X"="A".

For sheets "Adjustments" cells "B17" should count "IF" sheets "Prod A-Prod D" columns "C:C"="Service hand" and columns "X:X"="A".

And the same criteria for answer in sheet "Adjustments" cells "C16:E17", except columns "X:X" will change to "B-D" respectively.

How's that? Cannot do it clearer. Thanks.

rsdjimbie
Feb 28, 2010, 12:47 PM
Attachment

JBeaucaire
Feb 28, 2010, 09:16 PM
In B16:

=SUMPRODUCT(--('Line A'!$C$1:$C$100=$F$16), --('Line A'!$X$1:$X$100="A"))

The -- cause the TRUE/FALSE answers inside each array to convert into 1s and 0s, so the SUMPRODUCT() can them add them.

I also had to adjust the values in F16 and F17 to match the values on your Prod sheets.

rsdjimbie
Mar 4, 2010, 10:33 AM
Now, this is good!

JBeaucaire
Mar 4, 2010, 12:43 PM
That works for you? Glad to hear.