Solved

Countif in Excel

Posted on 2012-03-27
3
161 Views
Last Modified: 2012-03-27
Column C is a long list of dates.

I would like cell H3 to count all the dates that are inbetween the date listed in cell F3 and G3 (F3 and G3 are in order with F3 being the first date and G3 being the later date).

Any idea how to do this?

Thanks,

Chris
0
Comment
Question by:cansevin
3 Comments
 
LVL 9

Accepted Solution

by:
OCDan earned 500 total points
ID: 37773629
There are few ways but I generally use the sumproduct method:

Assuming all the dates are in cells c1-c100, and startdate in f3 and enddate in g3

=SUMPRODUCT((c1:c100>=F3)*(c1:c100<=g3)*(c1:c100>0))
0
 
LVL 40

Expert Comment

by:Kyle Abrahams
ID: 37773663
Update your range as necessary:
=SUMPRODUCT(--(C1:C200>=--F3),--(C1:C200<=--G3))
0
 
LVL 50

Expert Comment

by:barry houdini
ID: 37773680
The most efficient way in Excel 2007 is to use COUNTIFS

=COUNTIFS(C:C,">="&F3,C:C,"<="&G3)

regards, barry
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

INDEX and MATCH can be used to great effect to replace HLOOKUP and VLOOKUP as it does not have the limitation of needing the data to be sorted so that the reference value is in the first column or row. It also has the ability to perform a bi-directi…
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now