# Sickness Calendar

#### Krash7000

##### New Member
Hi All,

I'm after a bit of help if possible.

I have a list of employees absence's with start date of absence in column A, and end date of absence in column B.

What I want to do is have a list of dates for the year and work off how many employees were off each day.

E.g - Employee A was off from 01/01/20 until 05/01/20, and employee B was off on 04/01/20 - 04/01/20. Data should show as below:
01/01/20 - 1
02/01/20 - 1
03/01/20 - 1
04/01/20 - 2
05/01/20 - 1

### Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.

#### eirikdaude

##### Board Regular
This is fairly easily solved with
Excel Formula:
``COUNTIFS``
. Assuming the data for FROM is in column A and TO is in column B, you can put the dates for the year in e.g. column D and use a formula like:

Excel Formula:
``=COUNTIFS(\$A\$1:\$A\$2;"<="&\$D1;\$B\$1:\$B\$2;">="&\$D1)``

The result should be something like what you see in the screenshot below:

#### Krash7000

##### New Member
Thanks for such a quick response! I tried to copy and paste that formula as you had it, but it weirdly doesn't seem to like it when I do it. I am clearly missing something. Sorry!

#### Krash7000

##### New Member
I think so. When I write forumlas I use a comma , to separate range from criteria etc.

#### Krash7000

##### New Member
I think so. When I write forumlas I use a comma , to separate range from criteria etc.
Sorry, your right. I have changed the formula based on your comment. =COUNTIFS(\$A:\$A,"<="&\$D1,\$B:\$B,">="&\$D1) seems to work! Thanks!

Replies
10
Views
379
Replies
19
Views
551
Replies
8
Views
406
Replies
2
Views
39
Replies
1
Views
33

1,127,173
Messages
5,623,184
Members
415,956
Latest member
locos

### 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.

### Which adblocker are you using?

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

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