Count rows based on 2 dates

hailey123

New Member
Joined
May 28, 2018
Messages
14
I have a table that contain a start date & time in column B and an end date and time in column C of different events, I need a formula to count how many rows fall within a certain time. For example below: I need to work out how many rows fall under a specific time being 13:00 each day, I can work out manually that for the 01/02/2019 13:00 2 of the below events will cross over this, can someone please help me with an equation?

[TABLE="class: outer_border, width: 500"]
<tbody>[TR]
[TD]Event1[/TD]
[TD]01/02/2019 10:00[/TD]
[TD]05/02/2019 10:00[/TD]
[/TR]
[TR]
[TD]Event2[/TD]
[TD]03/02/2019 10:00[/TD]
[TD]04/02/2019 10:00[/TD]
[/TR]
[TR]
[TD]Event3[/TD]
[TD]01/02/2019 11:00[/TD]
[TD]03/02/2019 11:00[/TD]
[/TR]
</tbody>[/TABLE]

[TABLE="class: outer_border, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]01/02/2019 13:00[/TD]
[TD]02/02/2019 13:00[/TD]
[TD]03/02/2019 13:00[/TD]
[/TR]
[TR]
[TD]Number of Events[/TD]
[TD]2[/TD]
[TD]2[/TD]
[TD]2[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
try this


Book1
ABCD
1Event101/02/2019 10:0005/02/2019 10:00
2Event203/02/2019 10:0004/02/2019 10:00
3Event301/02/2019 11:0003/02/2019 11:00
4
5
601/02/2019 13:0002/02/2019 13:0003/02/2019 13:00
7Number of Events222
Sheet1
Cell Formulas
RangeFormula
B7=COUNTIFS($B$1:$B$3,"<="&B$6,$C$1:$C$3,">="&B$6)
 
Upvote 0

Forum statistics

Threads
1,223,894
Messages
6,175,254
Members
452,623
Latest member
Techenthusiast

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