Countifs using criteria with a date time

NZAS

Board Regular
Joined
Oct 18, 2012
Messages
117
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
Looking to do a count ifs fomula for below data

Count of Culomn G:G

Criteria
column B (Has a date time 24hr) is greater than or = 1/8/17 08:00 and Date less than or =1/8/2017 20:00
and Column D = "C"
So I get a count for each day and shift of (Column G)
i.e for 1/8/2017 Day Shift the count would be 4 and for nightshift would be 4

Cheers NZAS

Column B D E F G H I J
[TABLE="width: 550"]
<tbody>[TR]
[TD][/TD]
[TD="align: right"]1/08/2017 10:31
[/TD]
[TD] C
[/TD]
[TD="align: right"] 15096
[/TD]
[TD]3A722
[/TD]
[TD="align: right"]26
[/TD]
[TD] TWO
[/TD]
[TD]Day
[/TD]
[TD]Crew 2
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]1/08/2017 12:16
[/TD]
[TD] C
[/TD]
[TD="align: right"]15097
[/TD]
[TD]3A713
[/TD]
[TD="align: right"]43
[/TD]
[TD] TWO
[/TD]
[TD]Day
[/TD]
[TD]Crew 2
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]1/08/2017 14:39
[/TD]
[TD] C
[/TD]
[TD="align: right"]15098
[/TD]
[TD]3A713
[/TD]
[TD="align: right"] 31
[/TD]
[TD] TWO
[/TD]
[TD]Day
[/TD]
[TD]Crew 2
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]1/08/2017 16:21
[/TD]
[TD] C
[/TD]
[TD="align: right"]15099
[/TD]
[TD]3A948
[/TD]
[TD="align: right"]39
[/TD]
[TD] TWO
[/TD]
[TD]Day
[/TD]
[TD]Crew 2
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]1/08/2017 18:37
[/TD]
[TD]C
[/TD]
[TD="align: right"]15100
[/TD]
[TD]3A713
[/TD]
[TD="align: right"]34
[/TD]
[TD]ONE
[/TD]
[TD]Day
[/TD]
[TD]Crew 2
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]1/08/2017 23:05
[/TD]
[TD]C
[/TD]
[TD="align: right"]15101
[/TD]
[TD]3A994
[/TD]
[TD="align: right"]38
[/TD]
[TD]ONE
[/TD]
[TD]Night
[/TD]
[TD]Crew 1
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]2/08/2017 00:41
[/TD]
[TD]C
[/TD]
[TD="align: right"]15102
[/TD]
[TD]3A924
[/TD]
[TD="align: right"]48
[/TD]
[TD]ONE
[/TD]
[TD]Night
[/TD]
[TD]Crew 2
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]2/08/2017 03:09
[/TD]
[TD]C
[/TD]
[TD="align: right"]15103
[/TD]
[TD]3A986
[/TD]
[TD="align: right"]35
[/TD]
[TD]ONE
[/TD]
[TD]Night
[/TD]
[TD]Crew 2
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]2/08/2017 05:04
[/TD]
[TD]C
[/TD]
[TD="align: right"]15104
[/TD]
[TD]3A713
[/TD]
[TD="align: right"]26
[/TD]
[TD]ONE
[/TD]
[TD]Night
[/TD]
[TD]Crew 2
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]2/08/2017 17:01
[/TD]
[TD]C
[/TD]
[TD="align: right"]15105
[/TD]
[TD]3A986
[/TD]
[TD="align: right"]42
[/TD]
[TD]THREE
[/TD]
[TD]Day
[/TD]
[TD]Crew 3
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]2/08/2017 21:02
[/TD]
[TD]C
[/TD]
[TD="align: right"]15106
[/TD]
[TD]3A199
[/TD]
[TD="align: right"]43
[/TD]
[TD]TWO
[/TD]
[TD]Night
[/TD]
[TD]Crew 2
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]2/08/2017 23:33
[/TD]
[TD]C
[/TD]
[TD="align: right"]15107
[/TD]
[TD]3A986
[/TD]
[TD="align: right"]42
[/TD]
[TD]TWO
[/TD]
[TD]Night
[/TD]
[TD]Crew 2
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]3/08/2017 02:41
[/TD]
[TD]C
[/TD]
[TD="align: right"]15108
[/TD]
[TD]3A934
[/TD]
[TD="align: right"]42
[/TD]
[TD]TWO
[/TD]
[TD]Night
[/TD]
[TD]Crew 2
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]3/08/2017 04:52
[/TD]
[TD]C
[/TD]
[TD="align: right"]15109
[/TD]
[TD]3A924
[/TD]
[TD="align: right"]43
[/TD]
[TD]TWO
[/TD]
[TD]Night
[/TD]
[TD]Crew 2
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]3/08/2017 07:40
[/TD]
[TD]C
[/TD]
[TD="align: right"]15110
[/TD]
[TD]3A713
[/TD]
[TD="align: right"]46
[/TD]
[TD]THREE
[/TD]
[TD]Night
[/TD]
[TD]Crew 2
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]3/08/2017 10:59
[/TD]
[TD]C
[/TD]
[TD="align: right"]15111
[/TD]
[TD]3A713
[/TD]
[TD="align: right"]42
[/TD]
[TD]THREE
[/TD]
[TD]Day
[/TD]
[TD]Crew 3
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]3/08/2017 13:57
[/TD]
[TD]C
[/TD]
[TD="align: right"]15112
[/TD]
[TD]3A713
[/TD]
[TD="align: right"]42
[/TD]
[TD]THREE
[/TD]
[TD]Day
[/TD]
[TD]Crew 3
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]3/08/2017 16:07
[/TD]
[TD]C
[/TD]
[TD="align: right"]15113
[/TD]
[TD]3A713
[/TD]
[TD="align: right"]42
[/TD]
[TD]THREE
[/TD]
[TD]Day
[/TD]
[TD]Crew 3
[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 550"]
<tbody>[TR]
[TD][/TD]
[TD="align: right"]1/08/2017 10:31
[/TD]
[TD]C
[/TD]
[TD="align: right"]15096
[/TD]
[TD]3A722
[/TD]
[TD="align: right"]26
[/TD]
[TD]TWO
[/TD]
[TD]Day
[/TD]
[TD]Crew 2
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]1/08/2017 12:16
[/TD]
[TD]C
[/TD]
[TD="align: right"]15097
[/TD]
[TD]3A713
[/TD]
[TD="align: right"]43
[/TD]
[TD]TWO
[/TD]
[TD]Day
[/TD]
[TD]Crew 2
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]1/08/2017 14:39
[/TD]
[TD]C
[/TD]
[TD="align: right"]15098
[/TD]
[TD]3A713
[/TD]
[TD="align: right"]31
[/TD]
[TD]TWO
[/TD]
[TD]Day
[/TD]
[TD]Crew 2
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]1/08/2017 16:21
[/TD]
[TD]C
[/TD]
[TD="align: right"]15099
[/TD]
[TD]3A948
[/TD]
[TD="align: right"]39
[/TD]
[TD]TWO
[/TD]
[TD]Day
[/TD]
[TD]Crew 2
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]1/08/2017 18:37
[/TD]
[TD]C
[/TD]
[TD="align: right"]15100
[/TD]
[TD]3A713
[/TD]
[TD="align: right"]34
[/TD]
[TD]ONE
[/TD]
[TD]Day
[/TD]
[TD]Crew 2
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]1/08/2017 23:05
[/TD]
[TD]C
[/TD]
[TD="align: right"]15101
[/TD]
[TD]3A994
[/TD]
[TD="align: right"]38
[/TD]
[TD]ONE
[/TD]
[TD]Night
[/TD]
[TD]Crew 1
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]2/08/2017 00:41
[/TD]
[TD]C
[/TD]
[TD="align: right"]15102
[/TD]
[TD]3A924
[/TD]
[TD="align: right"]48
[/TD]
[TD]ONE
[/TD]
[TD]Night
[/TD]
[TD]Crew 2
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]2/08/2017 03:09
[/TD]
[TD]C
[/TD]
[TD="align: right"]15103
[/TD]
[TD]3A986
[/TD]
[TD="align: right"]35
[/TD]
[TD]ONE
[/TD]
[TD]Night
[/TD]
[TD]Crew 2
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]2/08/2017 05:04
[/TD]
[TD]C
[/TD]
[TD="align: right"]15104
[/TD]
[TD]3A713
[/TD]
[TD="align: right"]26
[/TD]
[TD]ONE
[/TD]
[TD]Night
[/TD]
[TD]Crew 2
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]2/08/2017 17:01
[/TD]
[TD]C
[/TD]
[TD="align: right"]15105
[/TD]
[TD]3A986
[/TD]
[TD="align: right"]42
[/TD]
[TD]THREE
[/TD]
[TD]Day
[/TD]
[TD]Crew 3
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]2/08/2017 21:02
[/TD]
[TD]C
[/TD]
[TD="align: right"]15106
[/TD]
[TD]3A199
[/TD]
[TD="align: right"]43
[/TD]
[TD]TWO
[/TD]
[TD]Night
[/TD]
[TD]Crew 2
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]2/08/2017 23:33
[/TD]
[TD]C
[/TD]
[TD="align: right"]15107
[/TD]
[TD]3A986
[/TD]
[TD="align: right"]42
[/TD]
[TD]TWO
[/TD]
[TD]Night
[/TD]
[TD]Crew 2
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]3/08/2017 02:41
[/TD]
[TD]C
[/TD]
[TD="align: right"]15108
[/TD]
[TD]3A934
[/TD]
[TD="align: right"]42
[/TD]
[TD]TWO
[/TD]
[TD]Night
[/TD]
[TD]Crew 2
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]3/08/2017 04:52
[/TD]
[TD]C
[/TD]
[TD="align: right"]15109
[/TD]
[TD]3A924
[/TD]
[TD="align: right"]43
[/TD]
[TD]TWO
[/TD]
[TD]Night
[/TD]
[TD]Crew 2
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]3/08/2017 07:40
[/TD]
[TD]C
[/TD]
[TD="align: right"]15110
[/TD]
[TD]3A713
[/TD]
[TD="align: right"]46
[/TD]
[TD]THREE
[/TD]
[TD]Night
[/TD]
[TD]Crew 2
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]3/08/2017 10:59
[/TD]
[TD]C
[/TD]
[TD="align: right"]15111
[/TD]
[TD]3A713
[/TD]
[TD="align: right"]42
[/TD]
[TD]THREE
[/TD]
[TD]Day
[/TD]
[TD]Crew 3
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]3/08/2017 13:57
[/TD]
[TD]C
[/TD]
[TD="align: right"]15112
[/TD]
[TD]3A713
[/TD]
[TD="align: right"]42
[/TD]
[TD]THREE
[/TD]
[TD]Day
[/TD]
[TD]Crew 3
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]3/08/2017 16:07
[/TD]
[TD]C
[/TD]
[TD="align: right"]15113
[/TD]
[TD]3A713
[/TD]
[TD="align: right"]42
[/TD]
[TD]THREE
[/TD]
[TD]Day
[/TD]
[TD]Crew 3
[/TD]
[/TR]
</tbody>[/TABLE]
 
Last edited:

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)

Forum statistics

Threads
1,223,904
Messages
6,175,295
Members
452,631
Latest member
a_potato

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