How to count date range while excluding dates

alm395

New Member
Joined
Apr 23, 2018
Messages
39
Office Version
  1. 365
Platform
  1. Windows
Hi,

I have a storm report that we have been running since 2/1/19 that basically tracks the number of incidents that occur each day.

This is a sample from the report (top row is the column they are in):
GMTU
DateTime frameMonthBlue Sky / Storm
2/1/2019 09:50:14

<tbody>
</tbody>
2:39:08

<tbody>
</tbody>
2B
6/6/2019 21:39:00

<tbody>
</tbody>
0:24:55

<tbody>
</tbody>
6S
6/7/2019 00:06:00

<tbody>
</tbody>
1:04:59

<tbody>
</tbody>
6S
6/9/2019 07:42:38

<tbody>
</tbody>
1:50:52

<tbody>
</tbody>
6S
6/27/2019 18:31:45

<tbody>
</tbody>
0:33:41

<tbody>
</tbody>
6S

<tbody>
</tbody>

I have one cell in the report that needs to count the total of orders for the month, another for the total of orders for the year, and another cell counting the totals if it meets a criteria:

Total for June Blue Sky:=COUNTIFS(Total_Data_Combined!$T:$T,MONTH(B1),Total_Data_Combined!$U:$U,"B")

Total for June Storm:=COUNTIFS(Total_Data_Combined!$T:$T,MONTH(B1),Total_Data_Combined!$U:$U,"S")

Total June if <1:00:00 during Storm: =COUNTIFS(Total_Data_Combined!$T:$T,MONTH(B1),Total_Data_Combined!$U:$U,"S")

Total YTD Storm: =COUNTIFS(Total_Data_Combined!$T:$T,MONTH(B1),Total_Data_Combined!$U:$U,"S",Total_Data_Combined!$M:$M,"<"&TIME(1,0,0))

Now we want to continue to track the same way that we have, but to exclude the dates of 6/6/2019 - 6/9/2019. How do I incorporate this in these formulas?

Thanks so much!
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Maybe something like this

Total: excluding 6/6/2019 to 6/9/2019 in G:G; T:T = Month (B1); U:U = "B"
=COUNTIFS(Total_Data_Combined!G:G,"<"&DATE(2019,6,6),Total_Data_Combined!T:T,MONTH(B1),Total_Data_Combined!U:U,"B")+COUNTIFS(Total_Data_Combined!G:G,">="&DATE(2019,6,10),Total_Data_Combined!T:T,MONTH(B1),Total_Data_Combined!U:U,"B")

M.
 
Upvote 0
Maybe something like this

Total: excluding 6/6/2019 to 6/9/2019 in G:G; T:T = Month (B1); U:U = "B"
=COUNTIFS(Total_Data_Combined!G:G,"<"&DATE(2019,6,6),Total_Data_Combined!T:T,MONTH(B1),Total_Data_Combined!U:U,"B")+COUNTIFS(Total_Data_Combined!G:G,">="&DATE(2019,6,10),Total_Data_Combined!T:T,MONTH(B1),Total_Data_Combined!U:U,"B")

M.


Awesome!!! Worked like a charm! :)
 
Upvote 0

Forum statistics

Threads
1,215,274
Messages
6,123,998
Members
449,137
Latest member
abdahsankhan

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