• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 194
  • Last Modified:

Countif in Excel

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
cansevin
Asked:
cansevin
1 Solution
 
OCDanCommented:
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
 
Kyle AbrahamsSenior .Net DeveloperCommented:
Update your range as necessary:
=SUMPRODUCT(--(C1:C200>=--F3),--(C1:C200<=--G3))
0
 
barry houdiniCommented:
The most efficient way in Excel 2007 is to use COUNTIFS

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

regards, barry
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now