Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Countif in Excel

Posted on 2012-03-27
3
Medium Priority
?
175 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 2000 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 41

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

876 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