Counting Sick day occurrences based on name

AndrewD04

New Member
Joined
Aug 24, 2017
Messages
40
Office Version
  1. 365
Good Morning,

Sorry i cant upload a copy as my excel wont allow me to.

I have a column of names in column C then a list of dates in column M - what i am trying to do is get a formula to count the list of sick days however if they are consecutive such as 16/05,17/05 and 18/05 count this as 1 occurrence.

This is an example of what i am trying to achieve, i have tried multiple ways including some other threads on here but none seem to work like i need any help is much appreciated

Sick DayOccurrence
Agent 1
17-May​
1​
Agent 1
18-May​
0​
Agent 1
23-May​
1​
Agent 2
12-May​
1​
Agent 2
23-May​
1​
Agent 3
10-May​
1​
Agent 3
11-May​
0​
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Maybe like this?

Book1
ABCD
1NameDateOccTest
2Agent 117/5/2311
3Agent 118/5/2300
4Agent 123/5/2311
5Agent 212/5/2311
6Agent 223/5/2311
7Agent 310/5/2311
8Agent 311/5/2300
9Agent420/06/20231
Sheet1
Cell Formulas
RangeFormula
D2:D9D2=IF(A2=A1,IFERROR(IF(DAYS(B2,B1)>1,1,0),1),1)
 
Upvote 1
Solution

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top