Countif function for date range

K

Komatsu

Column 'A' has beginning dates Column 'B' has Ending dates. Column 'C'
has dates to search by. 'D' will show results (qty).
Formula should count the times the date, 'C1' is equal to or between
rows adjacent dates in 'A' and 'B'. Continue to compare 'C1' to
'A2','B2'... 'A3', 'B3'....'A999','B999' (last record).
Then go to nest date to search by, 'C2' with results in 'D' column.
 
B

Bob Phillips

In D1

=SUMPRODUCT((A$1:A$999>=C1)(*B$1:B$999<=C1))

and then just copy down into D2, D3, etc.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
K

Komatsu

Didn't work. Returned '0' in every cell.
It looked like the '*' was in the wrong place... I moved it between the
() to make it look like (*) but that didn't help ether.
Any other suggestions?
 

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