Count IFS between 2 dates with multiple ranges

RebelAlley

New Member
Joined
Nov 29, 2017
Messages
3
I'm having an issue with my formula. What I want to do is count the number of times a date is in between 2 dates. I have a list of people and days they took off, each day is in a separate cell and each person is one row. I'm trying to string together multiple rows for my range. On another tab I have a column for the date at the beginning of the week (A) and the end of the week (B). This is what it looks like right now:
=SUM(COUNTIFS(INDIRECT({"Holiday!B16:BP16","Holiday!B29:BP29","Holiday!B41:BP41"}),"<="A2),(INDIRECT({"Holiday!B16:BP16","Holiday!B29:BP29","Holiday!B41:BP41"}),">="B2))

Excel won't even accept this as a formula and my head is starting to hurt thinking about it.

I also tried this which isn't working - it is picking up dates that are after the end of the week =SUM(COUNTIF(INDIRECT({"Holiday!B17:BP17","Holiday!B30:BP30","Holiday!B42:BP42"}),">="&[@End]-"6"))
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
I am not to clear how your spreasdsheet is set up. Here is my guess.

The dates are a named range call DaysOff

Person11/5/20191/13/20192/7/2019
Person21/13/20191/21/2019
Person31/21/20192/23/2019
Person42/23/20193/17/2019

<colgroup><col><col><col span="2"><col span="2"></colgroup><tbody>
</tbody>

(Not the full range)
On another sheet

Beginning of weekEnd of WeekCount Days Off
1/1/20191/5/20191
1/6/20191/13/20192
1/14/20191/21/20192
1/22/20191/29/20190

<tbody>
</tbody>

In the cells in column "Count Days Off" I put this formula in each cell
Code:
[FONT=Verdana]=COUNTIFS(DaysOff,">=" & A2,DaysOff,"<=" & B2)
[/FONT]
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,936
Messages
6,122,340
Members
449,079
Latest member
rocketslinger

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