Calculating the number of occasions with a set period sumproduct function

Posted by user158056 on Super User See other posts from Super User or by user158056
Published on 2012-09-18T08:47:04Z Indexed on 2012/09/18 9:40 UTC
Read the original article Hit count: 238

=SUMPRODUCT((F16:F274=("A"))  *(F17:F275<>("A")))
+SUMPRODUCT((F16:F274=("AH")) *(F17:F275<>("AH")))
+SUMPRODUCT((F16:F274=("AU")) *(F17:F275<>("AU")))
+SUMPRODUCT((F16:F274=("AHU"))*(F17:F275<>("AHU")))

I am using the above formula to add the number of occasions sickness occurs using the following as a key. It works fine until you get say an A and a AH in the same sickness period.

Instead of reporting just one occasion off it reports two. Is there a way I can separate this?

Absence A
Absence 1/2 AH
Absence Unpaid  AU
Absence 1/2 Unpaid  AHU

© Super User or respective owner

Related posts about excel-2010

Related posts about worksheet-function