Does anyone know if there is a method or function in excel that will total all the days in April and May separately? I have a large data set and calculate occupancy within a specific date range based on multiple criteria (using sumifs). Now I want to calculate the occupancy by month within that date range which could be 1 month or 1 year. A small example of a data set is below:
[TABLE="width: 225"]
<tbody>[TR]
[TD]Arrive[/TD]
[TD]Depart[/TD]
[TD]Total_Days[/TD]
[/TR]
[TR]
[TD="align: right"]4/2/2016[/TD]
[TD="align: right"]4/24/2016[/TD]
[TD]21[/TD]
[/TR]
[TR]
[TD="align: right"]4/4/2016[/TD]
[TD="align: right"]4/27/2016[/TD]
[TD]22[/TD]
[/TR]
[TR]
[TD="align: right"]4/6/2016[/TD]
[TD="align: right"]4/30/2016[/TD]
[TD]23[/TD]
[/TR]
[TR]
[TD="align: right"]4/8/2016[/TD]
[TD="align: right"]5/3/2016[/TD]
[TD]24[/TD]
[/TR]
[TR]
[TD="align: right"]4/10/2016[/TD]
[TD="align: right"]5/5/2016[/TD]
[TD]24[/TD]
[/TR]
[TR]
[TD="align: right"]3/27/2016[/TD]
[TD="align: right"]4/1/2016[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD="align: right"]3/29/2016[/TD]
[TD="align: right"]4/3/2016[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD="align: right"]3/31/2016[/TD]
[TD="align: right"]4/6/2016[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD="align: right"]4/2/2016[/TD]
[TD="align: right"]4/10/2016[/TD]
[TD]7[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 225"]
<tbody>[TR]
[TD]Arrive[/TD]
[TD]Depart[/TD]
[TD]Total_Days[/TD]
[/TR]
[TR]
[TD="align: right"]4/2/2016[/TD]
[TD="align: right"]4/24/2016[/TD]
[TD]21[/TD]
[/TR]
[TR]
[TD="align: right"]4/4/2016[/TD]
[TD="align: right"]4/27/2016[/TD]
[TD]22[/TD]
[/TR]
[TR]
[TD="align: right"]4/6/2016[/TD]
[TD="align: right"]4/30/2016[/TD]
[TD]23[/TD]
[/TR]
[TR]
[TD="align: right"]4/8/2016[/TD]
[TD="align: right"]5/3/2016[/TD]
[TD]24[/TD]
[/TR]
[TR]
[TD="align: right"]4/10/2016[/TD]
[TD="align: right"]5/5/2016[/TD]
[TD]24[/TD]
[/TR]
[TR]
[TD="align: right"]3/27/2016[/TD]
[TD="align: right"]4/1/2016[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD="align: right"]3/29/2016[/TD]
[TD="align: right"]4/3/2016[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD="align: right"]3/31/2016[/TD]
[TD="align: right"]4/6/2016[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD="align: right"]4/2/2016[/TD]
[TD="align: right"]4/10/2016[/TD]
[TD]7[/TD]
[/TR]
</tbody>[/TABLE]