Using COUNTIFS to compare data between 2 dates

russ101

New Member
Joined
Feb 11, 2011
Messages
15
I have all kinds of data and a lot of columns with lots of formulas to calculate different metrics, now I am concern with three columns of data particularly that I am trying to count to see how long a job in 01/25/2011 in category 4 took 3 hours to complete, and then another job in 02/21/2011 in category 3 took 5 hours to complete. So basically here is the data format.

A1. Any number between 1 - 10 (Categeories)
B1. Dates and Time -1/10/2011 14:48 (YTD Data)
C1. Duration - 6.30 Business hours (Came up from another formula)

So with some help wi was able to come up with the following formula

=COUNTIFS(B1:B5000,">="&"01/31/2011"+0,A10:A5000,3,C10:C5000,"<="&0.5) it works great but I would also like to get the data between 2 dates. For instance, if I am looking at the column of YTD data (01/01/2011 - 12/31/2011) and want to have a separate count for all of January (01/01/2011 to 01/31/2011), February (02/01/2011 to 02/28/2011), March etc. with the other criteria remains the same(A10:A5000,3,C10:C5000,"<="&0.5)
 

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"

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,209

E2: 1-Jan-11

E3: 1-Feb-11

etc...

F2, enter and copy down:
Code:
=EOMONTH(E2,0)

G2, enter and copy down:
Code:
=COUNTIFS(
    $A$10:$A$5000,3,
    $B$10:$B$5000,">="&E2,
    $B$10:$B$5000,">="&F2,
    $C$10:$C$5000,"<=0.5")
 

Forum statistics

Threads
1,141,850
Messages
5,708,982
Members
421,602
Latest member
jkpce1880

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
Top