0
votes

enter image description here

I have the following formulas which work separately but how do I combine them. I would like to count all cells with a "D" & "N" between columns B & AJ but only for rows that contain worker1

Count rows with worker1 =COUNTIFS(A2:A100, "worker1")

count all shifts between column B & AJ =SUM(COUNTIF(B:AJ,{"D","N"}))

1

1 Answers

0
votes

Use SUMPRODUCT:

=SUMPRODUCT(((B4:AJ100="D")+(B4:AJ100="n"))*(A4:A100="worker1"))