Count in a range, where identical adjacent cells count as one instance.

1. Count in a range, where identical adjacent cells count as one instance.

Hi guys

This will be my first question here, so sorry if I break any sort of etiquette. I have set up an attendence tracker that allows me to mark each employee with a status each day: Working, Sick, Half Day, Annual Leave and so on.

I would like to count their periods of absence. I know how to use count, countif and countifs, but I can't figure out how to do this. Example:

Sick Periods.xlsx

Absent on monday, present tuesday, absent wednesday and thursday, present friday. This would be 2 periods of absence.

Absent monday - friday. This would be 1 period of absence.

I'm essentially trying to group identical adjacent cells so that they only get counted by my formula once. Is this possible?

Any help would be much appreciated.

Thanks,

Robert

2. Re: Count in a range, where identical adjacent cells count as one instance.

It would be a good idea to post a sample workbook showing the format of your data, as well as an example of what your desired solution would look like.

3. Re: Count in a range, where identical adjacent cells count as one instance.

That's me added the example book. Cheers

4. Re: Count in a range, where identical adjacent cells count as one instance.

The following might be useful:
HTML Code:
HTML Code:

5. Re: Count in a range, where identical adjacent cells count as one instance.

I have tried the count only nonconsecutive threat, but I can't seem to work out how to turn the example formula they've given into something that works for me. I've tried messing about with the ranges and conditions but I'm still not getting it.

6. Re: Count in a range, where identical adjacent cells count as one instance.

It is beyond me unfortunately.

7. Re: Count in a range, where identical adjacent cells count as one instance.

This array formula** entered in I6 and copied down:

=SUM(IF(FREQUENCY(IF(C6:G6="sick",COLUMN(C6:G6)),IF(C6:G6<>"sick",COLUMN(C6:G6))),1))

** array formulas need to be entered using the key
combination of CTRL,SHIFT,ENTER (not just ENTER).
Hold down both the CTRL key and the SHIFT key
then hit ENTER.

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1