ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   COUNT SEPARATE PERIODS IN COLUMN (https://www.excelbanter.com/excel-programming/274570-count-separate-periods-column.html)

Paul Bird

COUNT SEPARATE PERIODS IN COLUMN
 
Hi - I am using a COUNTIF formula to count all S (Sick) entries in a column.
What I also need to be able to do is count the number of separate periods of
sickness.
E.g. entries in the column:

S
S
S
D
D
-
D
S
S

would equate to 5 days sickness with 2 separate periods of sickness.

How do I count the latter with a formula?

All help/ suggestions gratefully received.

Thanks in advance.



Tom Ogilvy

COUNT SEPARATE PERIODS IN COLUMN
 
=SUMPRODUCT((A1:A10="S")*(A1:A10<A2:A11))

Regards,
Tom Ogilvy



Paul Bird wrote in message
...
Hi - I am using a COUNTIF formula to count all S (Sick) entries in a

column.
What I also need to be able to do is count the number of separate periods

of
sickness.
E.g. entries in the column:

S
S
S
D
D
-
D
S
S

would equate to 5 days sickness with 2 separate periods of sickness.

How do I count the latter with a formula?

All help/ suggestions gratefully received.

Thanks in advance.






All times are GMT +1. The time now is 01:12 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com