Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
Solved

# Countif in Excel

Posted on 2012-03-27
Medium Priority
172 Views
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
Question by:cansevin
[X]
###### Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

• Help others & share knowledge
• Earn cash & points

LVL 9

Accepted Solution

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 40

Expert Comment

ID: 37773663
=SUMPRODUCT(--(C1:C200>=--F3),--(C1:C200<=--G3))
0

LVL 50

Expert Comment

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

Question has a verified solution.

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

Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
###### Suggested Courses
Course of the Month7 days, 7 hours left to enroll