Count the number of cells containing a date within a range

S

Scoffers

Investigated using COUNTIF but from what I can see you need to set specific
criteria i.e. an exact date rather than just a cell with any date in it.

I know I could count the blank cells and take them from the total number of
cells using COUNT but this is long winded.

Any help welcome.
 
P

Pete_UK

If you use COUNT it will not count blank cells. Similarly,

=COUNTIF(A:A,"<>")

will count all cells in column A that are not empty.

Hope this helps.

Pete
 
S

Stefi

You can refer to a cell containing a date:
=COUNTIF(B:B,A2)
returns how many times date in A2 occurs in column B!

The other part of your post is not understandable for me, please specify it
in details, possibly with an example!

Regards,
Stefi

„Scoffers†ezt írta:
 
M

Max

Since real dates are just numbers
=COUNT(A:A)
would be easiest, provided the col is clean data containing only real, valid
dates
(btw, blank cells won't affect COUNT)

If the data could be mixed, ie real dates interspersed with zeros or other
real nums which are not valid dates, something like this should provide more
robust results, ie check it within a known, valid date range, eg:
=SUMPRODUCT((A1:A10>=--"5 Jan 2009")*(A1:A10<=--"18 Jan 2009"))

High-five? Click Yes below
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:23,500 Files:370 Subscribers:66
xdemechanik
 
D

David Biddulph

=COUNTIF(A1:A100,">="&B1)-COUNTIF(A1:A100,">"&C1) if your limits (inclusive)
are in B1 and C1.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top