Countif with 2 criteria

AdamJones

New Member
Joined
Apr 1, 2016
Messages
9
I need to make a formula which counts dates and times as one rather than trying to count them manually:

The details are:

Sheet1 - Column G contains the date (29/07/2017 or 30/07/2017) and Column H contains the time (formatted as h.mm AM/PM)

In a separate sheet I have a "chart" with dates at the top (29/07/2017 & 30/07/2017) and times down the side (in hourly increments) and I would like to be able to insert a formula which counts the time they are arriving only if they are arriving on x date etc.


Any help would be greatly appreciated
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
try this


Excel 2012
ABCDEFGH
129/07/201730/07/2017datetime
212:00 AM2130/07/201708:30 PM
301:00 AM0030/07/201705:01 PM
402:00 AM0130/07/201706:22 AM
503:00 AM0030/07/201712:42 PM
604:00 AM0030/07/201712:24 AM
705:00 AM0029/07/201711:51 AM
806:00 AM0129/07/201712:45 AM
907:00 AM0030/07/201702:33 AM
1008:00 AM1029/07/201708:36 AM
1109:00 AM0029/07/201712:38 AM
1210:00 AM00
1311:00 AM10
1412:00 PM01
1501:00 PM00
1602:00 PM00
1703:00 PM00
1804:00 PM00
1905:00 PM01
2006:00 PM00
2107:00 PM00
2208:00 PM01
2309:00 PM00
2410:00 PM00
2511:00 PM00
2612:00 AM00
27
28
Sheet1
Cell Formulas
RangeFormula
B2=SUMPRODUCT(($G$2:$G$11=B$1)*($H$2:$H$11>=$A2)*($H$2:$H$11<$A3))
 
Upvote 0

Forum statistics

Threads
1,216,175
Messages
6,129,311
Members
449,499
Latest member
HockeyBoi

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